<h1>GoAhead Native API</h1>
<a name="Extensions"></a><h1>Extensions</h1>
  <table class="apiIndex" title="Extensions">
<tr class="apiDef">
<td class="apiName"><a href="#group___webs" class="nameRef">Webs</a></td>
<td class="apiBrief">GoAhead request structure.</td></tr>
<tr class="apiDef">
<td class="apiName"><a href="#group___webs_auth" class="nameRef">WebsAuth</a></td>
<td class="apiBrief">GoAhead Authentication.</td></tr>
<tr class="apiDef">
<td class="apiName"><a href="#group___webs_buf" class="nameRef">WebsBuf</a></td>
<td class="apiBrief">A WebsBuf (ring queue) allows maximum utilization of memory for data storage and is ideal for input/output buffering.</td></tr>
<tr class="apiDef">
<td class="apiName"><a href="#group___webs_hash" class="nameRef">WebsHash</a></td>
<td class="apiBrief">Hash table entry structure.</td></tr>
<tr class="apiDef">
<td class="apiName"><a href="#group___webs_route" class="nameRef">WebsRoute</a></td>
<td class="apiBrief">Request route structure.</td></tr>
<tr class="apiDef">
<td class="apiName"><a href="#group___webs_runtime" class="nameRef">WebsRuntime</a></td>
<td class="apiBrief">GoAhead Web Server Runtime.</td></tr>
<tr class="apiDef">
<td class="apiName"><a href="#group___webs_session" class="nameRef">WebsSession</a></td>
<td class="apiBrief">Session state storage.</td></tr>
<tr class="apiDef">
<td class="apiName"><a href="#group___webs_socket" class="nameRef">WebsSocket</a></td>
<td class="apiBrief">Socket control structure.</td></tr>
<tr class="apiDef">
<td class="apiName"><a href="#group___webs_upload" class="nameRef">WebsUpload</a></td>
<td class="apiBrief">File upload structure.</td></tr>
</table>
<a name="Functions"></a><h1>Functions</h1>
  <table class="apiIndex" title="Functions">
<tr class="apiDef"><td class="apiType">void</td><td><a href="#goahead_8h_1a80adc8087f3a20a2669565b281d57a38" class="nameRef">assert</a>(<a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> cond)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Assure that an assert condition is true.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_buf_1ga1838678c03f471aed89edfa5db822272" class="nameRef">bufAddNull</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Add a trailing null to the buffer.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_buf_1ga7fb267b66c30173cf035560028e83eba" class="nameRef">bufAdjustEnd</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Adjust the endp pointer by the specified size.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_buf_1ga89be85c8255bbe0b7a414af5f1587600" class="nameRef">bufAdjustStart</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> count)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Adjust the start (servp) reference.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_buf_1ga9ffe6a1664c7911d12e01f317fc18458" class="nameRef">bufCompact</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Compact the data in the buffer and move to the start of the buffer.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_buf_1ga5acfca7bd6b154817530a4551de9a4a6" class="nameRef">bufCreate</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, int increment, int maxsize)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a buffer.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_buf_1gaf5a93373e65f8a7ccb456eb4bf72bba8" class="nameRef">bufFlush</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Flush all data in the buffer and reset the pointers.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_buf_1gacda55401603f555af52faee39639d78c" class="nameRef">bufFree</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Free allocated storage for the buffer.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_buf_1gaa3a7777b78cd891c746772b5c489fd99" class="nameRef">bufGetBlk</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, char *blk, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Copy a block of from the buffer and adjust the servp.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_buf_1gafa8400821880a8f4d9f1cad4a9595626" class="nameRef">bufGetBlkMax</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Return the maximum number of bytes the buffer can provide via a single block copy.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_buf_1gaad216addfbff3e9ecacdf4f4a651ac90" class="nameRef">bufGetc</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get a character from the buffer and increment the servp.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_buf_1ga48fc76d92c206efcfdf3a376f85214dd" class="nameRef">bufGrow</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> room)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Grow the buffer by at least the required amount of room.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_buf_1gaa0ae470cc24e8e57db77e42ffb751b83" class="nameRef">bufInsertc</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, char c)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Insert a character to the buffer before the servp position and decrement the servp.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_buf_1ga284f3c18de56b775c0a13f58f78d4744" class="nameRef">bufLen</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the length of available data in the buffer.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_buf_1ga31ab202e1cef11fa44e7232100fc500f" class="nameRef">bufPut</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...) PRINTF_ATTRIBUTE(2</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Append a formatted string to the buffer at the endp position and increment the endp.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_buf_1gad14675b48245dc6eaabd6e6da8686a73" class="nameRef">bufPutBlk</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *blk, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Put a block to the buffer.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> ssize</td><td><a href="#group___webs_buf_1gaea6647f6507f65ea81faf7c47e8703e1" class="nameRef">bufPutStr</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Append a string to the buffer at the endp position and increment the endp.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_buf_1ga7c38d63ce718b544ebdb32807a34ca3e" class="nameRef">bufPutc</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, char c)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Append a character to the buffer at the endp position and increment the endp.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_buf_1gaa1f359ca367a6f72ebaa4b4028732333" class="nameRef">bufReset</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Reset the buffer pointers to the start of the buffer if empty.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_buf_1ga2ffac4a06b33a774a59e0441bbf0a555" class="nameRef">bufRoom</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Determine the room available in the buffer.</td></tr>
<tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_buf_1ga62f58e280d1d6706e8eb0637963f658e" class="nameRef">bufStart</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get a reference to the start of buffer data.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#goahead_8h_1a03544bf56dde3a257391d07e1d6f6a3a" class="nameRef">error</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Emit an error message.</td></tr>
<tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="nameRef">fmt</a>(char *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> maxSize, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *format, ...)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Format a string into a static buffer.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#group___webs_hash" class="ref">WebsHash</a></td><td><a href="#group___webs_hash_1ga38965650a2f6f2666e0120498594a135" class="nameRef">hashCreate</a>(int size)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a hash table.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_hash_1ga9ba32a89679bec0a778ce61dbc7a8e7b" class="nameRef">hashDelete</a>(<a href="#group___webs_hash" class="ref">WebsHash</a> id, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Delete a key by name.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_webs_key" class="ref">WebsKey*</a></td><td><a href="#group___webs_hash_1ga71278c9972c9252d0f6c34cda14bc156" class="nameRef">hashEnter</a>(<a href="#group___webs_hash" class="ref">WebsHash</a> id, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="#struct_webs_value" class="ref">WebsValue</a> value, int arg)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Enter a new key and value into the hash table.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_webs_key" class="ref">WebsKey*</a></td><td><a href="#group___webs_hash_1gac33b2f81aa5b83316a20dd6ea6da9bd1" class="nameRef">hashFirst</a>(<a href="#group___webs_hash" class="ref">WebsHash</a> id)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Start walking the hash keys by returning the first key entry in the hash.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_hash_1gae27ba1e72086c5fbc0019882c88129ea" class="nameRef">hashFree</a>(<a href="#group___webs_hash" class="ref">WebsHash</a> id)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Free a hash table.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_webs_key" class="ref">WebsKey*</a></td><td><a href="#group___webs_hash_1gae4dee9e0f69cd3e5a85b0952b022a414" class="nameRef">hashLookup</a>(<a href="#group___webs_hash" class="ref">WebsHash</a> id, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Lookup a name in the hash table.</td></tr>
<tr class="apiDef"><td class="apiType">void*</td><td><a href="#group___webs_hash_1ga1ca237f892334fd5a59387dc0c230f0d" class="nameRef">hashLookupSymbol</a>(<a href="#group___webs_hash" class="ref">WebsHash</a> sd, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Lookup a name in the hash table and return a symbol reference.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_webs_key" class="ref">WebsKey*</a></td><td><a href="#group___webs_hash_1gad26ba48ce394674a7e026dcc876f4e21" class="nameRef">hashNext</a>(<a href="#group___webs_hash" class="ref">WebsHash</a> id, <a href="#struct_webs_key" class="ref">WebsKey</a> *last)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Continue walking the hash keys by returning the next key entry in the hash.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a91ad9478d81a7aaf2593e8d9c3d06a14" class="ref">uint</a></td><td><a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="nameRef">hextoi</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Convert a hex string to an integer.</td></tr>
<tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="nameRef">itosbuf</a>(char *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size, <a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a> value, int radix)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Convert an integer to a string buffer.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#goahead_8h_1a95bd348305d4a3044216ec4d694cd1d4" class="nameRef">logClose</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Close the log logging module.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#goahead_8h_1ab4a2aa1bcdb9d47e37c84baa32cbf5fb" class="ref">WebsLogHandler</a></td><td><a href="#goahead_8h_1af07cb7c6e3a418059b33eb2243e0e945" class="nameRef">logGetHandler</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the log callback.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#goahead_8h_1a2c0c1dd956ebfaf981553f5a99cd7bb7" class="nameRef">logOpen</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Open the log logging module.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#goahead_8h_1ab4a2aa1bcdb9d47e37c84baa32cbf5fb" class="ref">WebsLogHandler</a></td><td><a href="#goahead_8h_1a69d48d711cafc09c257c41705b29eb6a" class="nameRef">logSetHandler</a>(<a href="#goahead_8h_1ab4a2aa1bcdb9d47e37c84baa32cbf5fb" class="ref">WebsLogHandler</a> handler)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set a log callback.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#goahead_8h_1a973f65430b9ee826c6906891d2173bd3" class="nameRef">logSetPath</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the filename to save logging output.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#goahead_8h_1a02f3703e8699520d66c2477e225af267" class="nameRef">logmsgProc</a>(int level, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Emit a message to the log.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="nameRef">scaselesscmp</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Compare strings ignoring case.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="nameRef">scaselessmatch</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Compare strings ignoring case.</td></tr>
<tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="nameRef">sclone</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Clone a string.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="nameRef">scmp</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Compare strings.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="nameRef">scopy</a>(char *dest, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> destMax, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *src)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Copy a string.</td></tr>
<tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="nameRef">sfmt</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *format, ...)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Format a string.</td></tr>
<tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="nameRef">sfmtv</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *format, va_list args)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Format a string with varargs.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="nameRef">slen</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Return the length of a string.</td></tr>
<tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="nameRef">slower</a>(char *str)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Convert a string to lower case.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="nameRef">smatch</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Compare strings.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="nameRef">sncaselesscmp</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Compare strings ignoring case.</td></tr>
<tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_runtime_1gafc391546b97fb1fefb3dd78a96acb1b4" class="nameRef">snclone</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Clone a substring.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="nameRef">sncmp</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Compare strings.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="nameRef">sncopy</a>(char *dest, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> destMax, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *src, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> count)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Copy characters from a string.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="nameRef">socketAddress</a>(struct sockaddr *addr, int addrlen, char *ipbuf, int ipLen, int *port)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Extract the numerical IP address and port for the given socket info.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="nameRef">socketAddressIsV6</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ip)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Determine if an IP address is an IPv6 address.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="nameRef">socketAlloc</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *host, int port, <a href="#group___webs_socket_1gae03359f7e0b6d71d55a625ae867c0032" class="ref">SocketAccept</a> accept, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Allocate a socket object.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="nameRef">socketClose</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Close the socket module.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="nameRef">socketCloseConnection</a>(int sid)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Close a socket connection.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_socket_1gada07f74963867ae158f0289c8483f846" class="nameRef">socketConnect</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *host, int port, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Connect to a server and create a new socket.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="nameRef">socketCreateHandler</a>(int sid, int mask, <a href="#group___webs_socket_1gabc472a96ad52eed12682302d4f0f5077" class="ref">SocketHandler</a> handler, void *arg)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a socket handler that will be invoked when I/O events occur.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_socket_1ga8844ac81357964309fd7e9f872ad1bd7" class="nameRef">socketDeleteHandler</a>(int sid)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Delete a socket handler created via socketCreateHandler.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="nameRef">socketEof</a>(int sid)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Determine if the socket is at end-of-file for input.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="nameRef">socketFree</a>(int sid)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Free (and close) the socket.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="nameRef">socketGetBlock</a>(int sid)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the current blocking mode.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="nameRef">socketGetError</a>(int sid)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the error code for the last socket operation on this thread.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#goahead_8h_1af9381320a2640ea84038579d8f143c01" class="ref">Socket</a></td><td><a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="nameRef">socketGetHandle</a>(int sid)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the underlying socket operating system socket/file handle.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#group___webs_socket" class="ref">WebsSocket**</a></td><td><a href="#group___webs_socket_1gac772288c5a34e90adb7e3c0edd372576" class="nameRef">socketGetList</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the list of sockets.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="nameRef">socketGetPort</a>(int sid)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the IP port associated with this socket.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_socket_1gae6ec811c6a5800916ac00db2c7c9fb30" class="nameRef">socketHasDualNetworkStack</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Indicate if the system has a dual IPv4 and IPv6 stack.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_socket_1ga764eb6101ccc3ba01f775436432cfd48" class="nameRef">socketHasIPv6</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Indicate if the system has IPv6 support.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_socket_1ga22d77c01e3349be30f4a24e790b72499" class="nameRef">socketHiddenData</a>(<a href="#group___webs_socket" class="ref">WebsSocket</a> *sp, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len, int dir)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Indicate that the application layer has buffered data for the socket.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="nameRef">socketInfo</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ip, int port, int *family, int *protocol, struct sockaddr_storage *addr, <a href="#goahead_8h_1a7e81f05ea37d05efc10e7c45c1111d0d" class="ref">Socklen</a> *addrlen)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get a socket address structure for the specified IP:Port.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="nameRef">socketIsV6</a>(int sid)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Determine if a socket is bound to an IPv6 address.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="nameRef">socketListen</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *host, int port, <a href="#group___webs_socket_1gae03359f7e0b6d71d55a625ae867c0032" class="ref">SocketAccept</a> accept, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Open a listening socket.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="nameRef">socketOpen</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Open the socket module.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="nameRef">socketParseAddress</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ipAddrPort, char **pip, int *pport, int *secure, int defaultPort)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Parse an IP address into its constituent parts.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="nameRef">socketProcess</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Process pending socket I/O events.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#group___webs_socket" class="ref">WebsSocket*</a></td><td><a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="nameRef">socketPtr</a>(int sid)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Return the socket object for the socket ID.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="nameRef">socketRead</a>(int sid, void *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Read data from a socket.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="nameRef">socketRegisterInterest</a>(int sid, int mask)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Register interest in socket I/OEvents.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="nameRef">socketReservice</a>(int sid)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Request that the socket be reserviced.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="nameRef">socketSelect</a>(int sid, int timeout)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Wait for I/O on a socket.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="nameRef">socketSetBlock</a>(int sid, int on)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the socket blocking mode.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="nameRef">socketSetError</a>(int error)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the error code for the last socket operation on this thread.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_socket_1ga172c24a34fcdff1a79fdde165738e07c" class="nameRef">socketSetNoDelay</a>(int sid, <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> on)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the socket delay mode.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="nameRef">socketWaitForEvent</a>(<a href="#group___webs_socket" class="ref">WebsSocket</a> *sp, int mask)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Wait for a socket I/O event.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="nameRef">socketWrite</a>(int sid, void *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Write data to the socket.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga7e6149e63a2f4ad6fc53ac6ac60cec1a" class="nameRef">sslClose</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Close the ssl module.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gaeebef5121f49387a67fc33de42aefffe" class="nameRef">sslFree</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Free a ssl connection associated with a request.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga81e8547c8bf48f6b74e0ea2fab0a296c" class="nameRef">sslOpen</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Open the ssl module.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_1ga8063a955fe7c9d4f3f1ccb036d186835" class="nameRef">sslRead</a>(<a href="#group___webs" class="ref">Webs</a> *wp, void *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Read data from a secure socket.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga0ceefc6dfb2a71dec6c5a18b37097c64" class="nameRef">sslUpgrade</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Upgrade a request connection to utilize SSL.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_1gaf190d807759ac01cad747d013b1893cf" class="nameRef">sslWrite</a>(<a href="#group___webs" class="ref">Webs</a> *wp, void *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>WRite data to a secure socket.</td></tr>
<tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_runtime_1ga3749b26084eb67b7f76bb7aa48c839d5" class="nameRef">ssplit</a>(char *str, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *delim, char **last)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Split a string at a delimiter.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#goahead_8h_1a5eec22bfd3a58a8c344d30175849f2ee" class="nameRef">sstarts</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *prefix)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Test if the string starts with a given pattern.</td></tr>
<tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="nameRef">stok</a>(char *str, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *delim, char **last)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Tokenize a string.</td></tr>
<tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="nameRef">strim</a>(char *str, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *set, int where)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Trim a string.</td></tr>
<tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="nameRef">supper</a>(char *str)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Convert a string to upper case.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#goahead_8h_1a377d5247f829befd58214234183e84ee" class="nameRef">traceProc</a>(int level, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Emit a debug trace message to the log.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#goahead_8h_1ac5058870cad6692d50f7fa9775a56c25" class="nameRef">valueFree</a>(<a href="#struct_webs_value" class="ref">WebsValue</a> *value)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Free any allocated string in a value.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_webs_value" class="ref">WebsValue</a></td><td><a href="#goahead_8h_1aa27f5beea810d9124985ecf1c1fe41fa" class="nameRef">valueInteger</a>(long value)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create an integer value.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_webs_value" class="ref">WebsValue</a></td><td><a href="#goahead_8h_1adb8296687c9b528cfa0d9deb2eb42cf0" class="nameRef">valueString</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create an string value.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_webs_value" class="ref">WebsValue</a></td><td><a href="#goahead_8h_1aa9292efb92931035fbdb7e8cc9fc2a58" class="nameRef">valueSymbol</a>(void *value)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create an symbol value containing an object reference.</td></tr>
<tr class="apiDef"><td class="apiType">void*</td><td><a href="#goahead_8h_1a8fcf6c446be29f4fa9e558cef4f62428" class="nameRef">walloc</a>(<a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Allocate a block of the requested size.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="nameRef">wallocHandle</a>(void *map)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Allocate a handle from a map.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="nameRef">wallocObject</a>(void *map, int *max, int size)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Allocate an object in a halloc map.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#goahead_8h_1ab07b7c0b89520599c586358086c52568" class="nameRef">wcloseAlloc</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Close the GoAhead memory allocator.</td></tr>
<tr class="apiDef"><td class="apiType">void*</td><td><a href="#goahead_8h_1a364829588ded7824a6226c71dda5bd43" class="nameRef">wdup</a>(<a href="osdep.html#osdep_8h_1a5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *ptr, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> usize)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Duplicate memory.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga0a02508940140401b730219dba7295d5" class="nameRef">websAccept</a>(int sid, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ipaddr, int port, int listenSid)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Accept a new connection.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gaf903a6d7928616f803d294de73f8cd11" class="nameRef">websActionOpen</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Open the action handler.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_webs_role" class="ref">WebsRole*</a></td><td><a href="#group___webs_auth_1ga637ac17c1c1d24cafa5589b00e4ef82b" class="nameRef">websAddRole</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *role, <a href="#group___webs_hash" class="ref">WebsHash</a> abilities)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Add a role.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#group___webs_route" class="ref">WebsRoute*</a></td><td><a href="#group___webs_route_1ga591531eedbacb9dbe29c0461ebbdd9eb" class="nameRef">websAddRoute</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *uri, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *handler, int pos)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Add a route to the routing tables.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_webs_user" class="ref">WebsUser*</a></td><td><a href="#group___webs_auth_1ga9aa0a184957878bff4eeaddc8774c96a" class="nameRef">websAddUser</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *username, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *password, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *roles)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Add a user.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga069bb8b6d336ca5f8ea2f3b8c113371b" class="nameRef">websAlloc</a>(int sid)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Allocate a new Webs object.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#group___webs_session" class="ref">WebsSession*</a></td><td><a href="#group___webs_session_1ga960eb7ffd15820d3305445b257462b9d" class="nameRef">websAllocSession</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *id, int lifespan)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Test if a user possesses the required ability.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_auth_1ga2e7099150ce40f126e53901b37055164" class="nameRef">websAuthenticate</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Authenticate a user.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_auth_1ga4b9213d33c030e357c81a97765a83ab3" class="nameRef">websCan</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="#group___webs_hash" class="ref">WebsHash</a> ability)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Test if a user possesses the required ability.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gad02e7e70e4f3b7bca1ee2a318a336e80" class="nameRef">websCancelTimeout</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Cancel the request timeout.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1gac05856f3dd04aeef0732570bedf044ad" class="nameRef">websCgiHandler</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>CGI handler service callback.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1gae908f662db14b2f0571634f48dda790c" class="nameRef">websCgiOpen</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Open the CGI handler.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1gac14f9e9acabae760c4225c6a372747a5" class="nameRef">websCgiPoll</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Poll for output from CGI processes and output.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#goahead_8h_1a93ffe2fd6f833e223e48dac77c650daa" class="nameRef">websCheckPassword</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *plainTextPassword, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *passwordHash)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Check a plain-text password against the defined hashed password.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga94471225b733c21ebe13449aed71cf98" class="nameRef">websClose</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Close the core GoAhead web server module.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_auth_1gafd247c60a4a156f514fae54aba5c95af" class="nameRef">websCloseAuth</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Close the authentication module.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gac3d3297f51f566d7dcd0c1003180f210" class="nameRef">websCloseFile</a>(int fd)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Close an open file.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_route_1ga712fb5968ea34647fbd198b281576b4e" class="nameRef">websCloseRoute</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Close the route module.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga2ebc310e8ccbfd0e52a29d5f8d192b13" class="nameRef">websCompareVar</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *var, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Compare a request variable.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_auth_1ga4d6532cddbf3407711d240f6d2591bc9" class="nameRef">websComputeAllUserAbilities</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Compute the abilities for all users by resolving roles into abilities.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga6e0b2ea7b62d847fd10d7bb761d1189e" class="nameRef">websConsumeInput</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> nbytes)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Consume input from the request input buffer.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#group___webs_session" class="ref">WebsSession*</a></td><td><a href="#group___webs_session_1ga69bb1da9a9f13651d5a6db9379cb37e9" class="nameRef">websCreateSession</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Test if a user possesses the required ability.</td></tr>
<tr class="apiDef"><td class="apiType">char*</td><td><a href="#goahead_8h_1afd405fa10ef57a17f18b099e7cee1ee2" class="nameRef">websCryptPassword</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *password, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *salt, int rounds)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Encrypt a password using the Blowfish algorithm.</td></tr>
<tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_1ga762ed53bab0974c82bfa0fdcef22580d" class="nameRef">websDecode64</a>(char *str)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Decode the string using base-64 encoding.</td></tr>
<tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_1ga3b21883f613ad05e48a9de43714bf67e" class="nameRef">websDecode64Block</a>(char *str, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> *len, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Decode a block using base-46 encoding.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gab121f04477c839b0750fb24db5f25d8b" class="nameRef">websDecodeUrl</a>(char *decoded, char *input, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Decode a URL expanding NN encoding.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga16df3436fa7bff9179b1d278c24beef5" class="nameRef">websDefineAction</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, void *fun)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Define an action callback for use with the action handler.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1gabfae07af8717f3e8080cc4738db4ae1e" class="nameRef">websDefineHandler</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="#group___webs_1ga1b14d912d52adc694c3c713ec0a17412" class="ref">WebsHandlerProc</a> match, <a href="#group___webs_1ga1b14d912d52adc694c3c713ec0a17412" class="ref">WebsHandlerProc</a> service, <a href="#group___webs_1ga6b8f7c9a8138c1c585ec1c2b7aa7a954" class="ref">WebsHandlerClose</a> close, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Define a request handler.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga7f4aa0888bf456eab90a010bcbcdb770" class="nameRef">websDefineJst</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="#group___webs_1ga35aa7f7f128a9d1a4c4f3eeb7849d638" class="ref">WebsJstProc</a> fn)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Define a Javscript native function.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_session_1ga8f9464efab7e9045cab72863ccdb81db" class="nameRef">websDestroySession</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Destroy the webs session object.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gac2af58b7a686cb33e44eb010cf755ce1" class="nameRef">websDone</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Complete a request.</td></tr>
<tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_1ga97f5bcd7b8aa8df838037f9cf2c55267" class="nameRef">websEncode64</a>(char *str)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Encode a string using base-64 encoding.</td></tr>
<tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_1ga01aac3c460b2484e8f26f147e993846e" class="nameRef">websEncode64Block</a>(char *str, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Encode a block using base-64 encoding.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gac898af1d6d0c6cccb905e6a53479b559" class="nameRef">websError</a>(<a href="#group___webs" class="ref">Webs</a> *wp, int code, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Complete a request with an error response.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1ga36a32239715d1f4eedff518aa81542ba" class="nameRef">websErrorMsg</a>(int code)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get a message for a HTTP status code.</td></tr>
<tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_1ga22d0cc25b40e3a8039b9c62da85661bd" class="nameRef">websEscapeHtml</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Escape unsafe characters in a string.</td></tr>
<tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_1ga53edc269c112daec8f25ce42bc91421c" class="nameRef">websEscapeUri</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Escape unsafe URI characters in a string using CC substitution.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gaf24cee2f9e39e20e09e73067b8b5b072" class="nameRef">websFileOpen</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Open and initialize the file handler.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga6525ac98afd32c69fd0a7985c0b87f5f" class="nameRef">websFlush</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> block)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Flush buffered transmit data and compact the transmit buffer to make room for more data.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga34a9c871eaf4cba49ff81174318af979" class="nameRef">websFree</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Free the webs request object.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga54bd8e9073aca8fe5ac527e0b26ae738" class="nameRef">websFreeUpload</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Free file upload data structures.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga3d2d9787c3fd3b4338ae0a6995fbb338" class="nameRef">websFsClose</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Close the file system module.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga0014f224e979be944998d31c4faad46f" class="nameRef">websFsOpen</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Open the file system module.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga4ac722a8a552f9740ad97de6f23891a4" class="nameRef">websGetBackground</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the background execution flag.</td></tr>
<tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_1ga1dd8b54372cecf50a6773639ca10de8b" class="nameRef">websGetCgiCommName</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get a unique temporary filename for CGI communications.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1ga0c1129a2e6d2ab25749ce6434cf06917" class="nameRef">websGetCookie</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the request cookie if supplied.</td></tr>
<tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_1ga8d082538c22928173eaf231eece3c2bb" class="nameRef">websGetDateString</a>(<a href="#struct_webs_file_info" class="ref">WebsFileInfo</a> *sbuf)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get a date as a string.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga9cbfca3c673e58c64325460d6e0c5e74" class="nameRef">websGetDebug</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the debug flag.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1ga8ee6d14425afb8eefebf5556ee18c8a2" class="nameRef">websGetDir</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the base file directory for a request.</td></tr>
<tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_1ga2996ca4f6fd53f9b968930add8cf037c" class="nameRef">websGetDocuments</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the GoAhead base documents directory.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga2666ed7d6a56c3014d5ceb076cff0567" class="nameRef">websGetEof</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the request EOF status.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1gae8b669809d9cba59ef7b77ec5b754dc0" class="nameRef">websGetExt</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the request URI extension.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1ga1d34d561f81d6f9ad69244a06d6e38cf" class="nameRef">websGetFilename</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the request filename.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1ga3d13a47ed8ee3f9a3126f51ae1b9d620" class="nameRef">websGetHost</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the request host.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1gabfdcb79258d04eaa6912393d155eab6c" class="nameRef">websGetIfaddr</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the request interface address.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1ga37e0f4bfb4dc0bfaf554863df437ece6" class="nameRef">websGetIndex</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the default index document name.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga2746a02538e42a71d4ef272a9971f986" class="nameRef">websGetLogLevel</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the current trace log level.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1ga899fcb60a5afe215e7c56bc1f3c00961" class="nameRef">websGetMethod</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the request method.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1gaf36ce4de6a4772ed13ef1f6073d9cb7a" class="nameRef">websGetPassword</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the request password.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#group___webs_1ga196a6343b64e6944f3b77b8af709a7e8" class="ref">WebsVerify</a></td><td><a href="#group___webs_auth_1gac59e51db50106639503b066a95258b75" class="nameRef">websGetPasswordStoreVerify</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the password store verify callback.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1ga4c8b947cea7d8077f51d023aec7cd603" class="nameRef">websGetPath</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the request path.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1gaee772cdbaee60ec39567c47e9a83c2c6" class="nameRef">websGetPort</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the request TCP/IP port.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1gaa18fd6e345dee2e99c47f02471978177" class="nameRef">websGetProtocol</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the request HTTP protocol.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1gafae1ecad7c3b1a2bfe452cbab8025ab1" class="nameRef">websGetQuery</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the request query component.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#goahead_8h_1a3bc1b2f042bfc719a05eb1b9adb0776b" class="nameRef">websGetRandomBytes</a>(char *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> length, <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> block)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get some random data.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#group___webs_hash" class="ref">WebsHash</a></td><td><a href="#group___webs_auth_1gac4ce05bc63317ae4689e42b0bba4f6b7" class="nameRef">websGetRoles</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the roles hash.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1ga4968ce8b1e8a6fe330b1bf78bb77e278" class="nameRef">websGetServer</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the server host name.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1ga999c5adc0501b4c00414caa8baaf6230" class="nameRef">websGetServerAddress</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the server IP address.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1gab976a367d9cecfef956869e053328862" class="nameRef">websGetServerAddressUrl</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the server IP address with port number.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1gaf852b66707400fa0cf172a72731893ce" class="nameRef">websGetServerUrl</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the server host name with port number.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#group___webs_session" class="ref">WebsSession*</a></td><td><a href="#group___webs_session_1gabaceff85a59337282e9807f62aa046a7" class="nameRef">websGetSession</a>(<a href="#group___webs" class="ref">Webs</a> *wp, int create)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the session state object for the current request.</td></tr>
<tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_session_1gac8c7bf25c2eda7a6a23111f8bff56df7" class="nameRef">websGetSessionID</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the session ID.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_session_1gae766fcda76d2f12f44e21a7ed18ffd55" class="nameRef">websGetSessionVar</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *defaultValue)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get a session variable.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#group___webs_hash" class="ref">WebsHash</a></td><td><a href="#group___webs_upload_1gaf80a429f3b30c1e621e917c8f04f0415" class="nameRef">websGetUpload</a>(struct Webs *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the hash of uploaded files for the request.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1ga972f7fc60c236c0e4e6ea7e325096b73" class="nameRef">websGetUrl</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the request URI.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1ga78e094c02b19ce4de8d7c8b62f05be18" class="nameRef">websGetUserAgent</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the client User-Agent HTTP header.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1ga46696bd6220b11d9e7edf516cd17e578" class="nameRef">websGetUsername</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the request username.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#group___webs_hash" class="ref">WebsHash</a></td><td><a href="#group___webs_auth_1gad3d4ca84a25b0efea6d8aca2bf3784d5" class="nameRef">websGetUsers</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get the users hash.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1ga4cd0530612a92dde9042c030c369e7d8" class="nameRef">websGetVar</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *defaultValue)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get a request variable.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga75e53757d82543b1b27797967c0aefb6" class="nameRef">websJstOpen</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Open the Javascript module.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga88501f83c58a6ea9dc8fd14974db9130" class="nameRef">websJstWrite</a>(int jid, <a href="#group___webs" class="ref">Webs</a> *wp, int argc, char **argv)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Write data to the response.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1gaa883a6d5dfe21e9ae5fd6f1bae2b72c9" class="nameRef">websListen</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *endpoint)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Listen on a TCP/IP address endpoint.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_route_1ga84cade4d96e10f90f48a89403ffe8585" class="nameRef">websLoad</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Load routing tables from the specified filename.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_auth_1ga0359ac96f9112adc03baa0ed6d4740d6" class="nameRef">websLoginUser</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *username, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *password)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Login a user by verifying the login credentials.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_auth_1ga2ce714b242d8f8d184daaa82eadb1aaf" class="nameRef">websLogoutUser</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Logout a user and remove the user login session.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#group___webs_upload" class="ref">WebsUpload*</a></td><td><a href="#group___webs_upload_1ga5013b6ef4b2b9be6ea09dea369a8f409" class="nameRef">websLookupUpload</a>(struct Webs *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Open the file upload filter.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_webs_user" class="ref">WebsUser*</a></td><td><a href="#group___webs_auth_1ga3ebda5094fd5aaf033c0a01f666db5e2" class="nameRef">websLookupUser</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *username)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Lookup if a user exists.</td></tr>
<tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_1ga24336820ff761ed13dd23341a9b86ed5" class="nameRef">websMD5</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get an MD5 digest of a string.</td></tr>
<tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_1ga06c3e0f9f7351e1127d21ff3713df104" class="nameRef">websMD5Block</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> length, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *prefix)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get an MD5 digest of a block and optionally prepend a prefix.</td></tr>
<tr class="apiDef"><td class="apiType">char*</td><td><a href="#goahead_8h_1a91d31000f4f654a4f0d58acf73dbc169" class="nameRef">websMakePassword</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *password, int saltLength, int rounds)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Make a password hash for a plain-text password using the Blowfish algorithm.</td></tr>
<tr class="apiDef"><td class="apiType">char*</td><td><a href="#goahead_8h_1ad9f484cc1aa0aec171b19795a961b618" class="nameRef">websMakeSalt</a>(<a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Make salt for adding to a password.</td></tr>
<tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_1ga8f14fc6ef969671a37ed65acc154a57f" class="nameRef">websNormalizeUriPath</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Normalize a URI path.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga3b5c4de81f247a9faf225c636ec8c79f" class="nameRef">websNoteRequestActivity</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Take not of the request activity and mark the time.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga1cedecd14d83cdd8dcbffceb8b51791c" class="nameRef">websOpen</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *documents, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *routes)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Open the web server.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_auth_1ga7653f9dcb2904cd3632b019273c02ade" class="nameRef">websOpenAuth</a>(int minimal)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Open the authentication module.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga3e3edc47c5f177466de9c3eabe664b88" class="nameRef">websOpenFile</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, int flags, int mode)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Open the web page document for the current request.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_route_1ga22d74d0805089decff152b0a35d4442f" class="nameRef">websOpenRoute</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Open the routing module.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga690dbbada9274dd35ce9d2a96d981e07" class="nameRef">websOptionsOpen</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Open the options handler.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gad56c750456cbcb6bde8f6e28d4ba3989" class="nameRef">websOsClose</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Close the O/S dependent code.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1gada39f22333835280a7be57bd1770aef1" class="nameRef">websOsOpen</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Open the O/S dependent code.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga42ac8fd2d43cd62e36de672897476033" class="nameRef">websPageClose</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Close the document page.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1gae3a5d48960ff548b64372bf79d151801" class="nameRef">websPageIsDirectory</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Test if the document page for the request corresponds to a directory.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga550a444cd6c8991eef437ece0cff386a" class="nameRef">websPageOpen</a>(<a href="#group___webs" class="ref">Webs</a> *wp, int mode, int perms)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Open a web page document for a request.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_1ga412045a224b12fad35f3ccb0eba21309" class="nameRef">websPageReadData</a>(<a href="#group___webs" class="ref">Webs</a> *wp, char *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Read data from the request page document.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gade99dac2cc10314deb754833298fc3af" class="nameRef">websPageSeek</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="#goahead_8h_1a7bac74916a564105339bcd5a9323c366" class="ref">Offset</a> offset, int origin)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Seek to a position in the request page document.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1gafa581d664b5cc3eacc073d1a5d113d7a" class="nameRef">websPageStat</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="#struct_webs_file_info" class="ref">WebsFileInfo</a> *sbuf)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get file status for the current request document.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1gac893e2749beee259505e673c4e551f04" class="nameRef">websParseDateTime</a>(<a href="#goahead_8h_1acdd9aaf80c8e9b08b3cf94200c91a6ae" class="ref">WebsTime</a> *time, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *date, struct tm *defaults)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Parse a date/time string.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_1ga0853e59f6f1dba6c94c8d3d659106e7f" class="nameRef">websProcessCgiData</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Process CGI request body data.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_1gabf36424ddd2ef63ac20fc1419debc90e" class="nameRef">websProcessUploadData</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Process upload data for form, multipart mime file upload.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gaf8cbf1876923de6cacc9654cb89692dd" class="nameRef">websPump</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Pump the state machine.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_1ga648cc4a4536a44aefcffaa091b3ea37f" class="nameRef">websReadFile</a>(int fd, char *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Read data from an open file.</td></tr>
<tr class="apiDef"><td class="apiType">char*</td><td><a href="#goahead_8h_1a55f60843dbda2cebe58dd6a2c8ad7f76" class="nameRef">websReadPassword</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *prompt)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get a password from the terminal console.</td></tr>
<tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_1gab71f9da6c9f523bd6486fa9e2065cb5b" class="nameRef">websReadWholeFile</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Read all the data from a file.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga71919fc188e9b1f7130891b22181abd4" class="nameRef">websRedirect</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *url)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Redirect the client to a new URL.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga2071f8d94ddff6c2143caeca98e4b28d" class="nameRef">websRedirectByStatus</a>(<a href="#group___webs" class="ref">Webs</a> *wp, int status)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Redirect the client to a new URI.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_auth_1ga19bedf7e54b1993a08f2f6e7ae7dea9c" class="nameRef">websRemoveRole</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *role)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Remove a role from the system.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_route_1gadccfe94478f976a3a93b8a5b9be1acc0" class="nameRef">websRemoveRoute</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *uri)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Remove a route from the routing tables.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_session_1ga7ae8ed7ba925a225ee0bad96f3829c56" class="nameRef">websRemoveSessionVar</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Remove a session variable.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_auth_1gaada9cd540cd4c0f488c0acfa1558d4fd" class="nameRef">websRemoveUser</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Remove a user from the system.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gab0e25f7d5e2ab92116e94a3d2f0e6712" class="nameRef">websResponse</a>(<a href="#group___webs" class="ref">Webs</a> *wp, int status, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *msg)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create and send a request response.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_runtime_1ga766658ed30f45bec60eef120f2b74c08" class="nameRef">websRestartEvent</a>(int id, int delay)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Restart an event.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga5a766509244081e0f76bc70479b2a912" class="nameRef">websRewriteRequest</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *url)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Rewrite a request.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_route_1gabac20ffa1da08fefb06d471c6a589c1d" class="nameRef">websRouteRequest</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Route a request.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_runtime_1ga31529c388cac3e90a71766bc445b6575" class="nameRef">websRunEvents</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Run due events.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_route_1ga13356d1f5c87381edd681495e5187bcd" class="nameRef">websRunRequest</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Run a request handler.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gaa36f628a3e14fe08420597095f0f74c2" class="nameRef">websRuntimeClose</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Close the runtime code.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga4d8e96f6b4a072ca8cadda04912a669e" class="nameRef">websRuntimeOpen</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Open the runtime code.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#goahead_8h_1a7bac74916a564105339bcd5a9323c366" class="ref">Offset</a></td><td><a href="#group___webs_1gaca0e8d193f5ad1592e7945ac95d9d96e" class="nameRef">websSeekFile</a>(int fd, <a href="#goahead_8h_1a7bac74916a564105339bcd5a9323c366" class="ref">Offset</a> offset, int origin)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Seek to a position in the current request page document.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1gae1e0fc3c37a3050a6da804a42637b32e" class="nameRef">websServer</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *endpoint, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *documents)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>One line embedding API.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga81d8a2cfbe5360e1a46011172470368a" class="nameRef">websServiceEvents</a>(int *finished)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Service I/O events until finished.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gaed3bf51e30277fe1b56379bb6a1b6699" class="nameRef">websSetBackground</a>(int on)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the background processing flag.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#goahead_8h_1a5a271ccc2e8fbc76a49f2f2022db21cc" class="nameRef">websSetBackgroundWriter</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="#goahead_8h_1ab831e30480b27feb88a15c09f382719f" class="ref">WebsWriteProc</a> proc)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Define a background write I/O event callback.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga628ad13f465a4c67339e2b53540ad01a" class="nameRef">websSetCookie</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *domain, int lifespan, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Define a cookie to include in the response.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gae3b839fa0c223b457f109c61c177da96" class="nameRef">websSetDebug</a>(int on)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the debug processing flag.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gaf0802eca30adb2cc9d2b7d2ccc2badc6" class="nameRef">websSetDocuments</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *dir)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the web documents directory.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga01f49a8761bd89203fa493a79a821e56" class="nameRef">websSetEnv</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create the CGI environment variables for the current request.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gacba78b1a19ef4ddade76807333243d5c" class="nameRef">websSetFormVars</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create request variables for query and POST body data.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga826854eb79f23630f7f7905ccf862976" class="nameRef">websSetHost</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *host)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Define the host name for the server.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga346178ebf1361d67acab6a62ff15adc2" class="nameRef">websSetIndex</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *filename)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create and send a request response.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga7528ade178ede9cd6fe6abe011869dc1" class="nameRef">websSetIpAddr</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ipaddr)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Define the host IP address.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga46d153b401bb7fc47ae5b17203541644" class="nameRef">websSetLogLevel</a>(int level)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the current trace log level.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#goahead_8h_1ae8c0353bf1c238af495fa5e4122b4af6" class="nameRef">websSetMemNotifier</a>(<a href="#goahead_8h_1afba3dd63a743f10ca6c166335f2ba7a9" class="ref">WebsMemNotifier</a> cback)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Define a global memory allocation notifier.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_auth_1gac050abeadb21db4a90197eab284b115b" class="nameRef">websSetPasswordStoreVerify</a>(<a href="#group___webs_1ga196a6343b64e6944f3b77b8af709a7e8" class="ref">WebsVerify</a> verify)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the password store verify callback.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga9b7ae14718f40340d9621529f4587548" class="nameRef">websSetQueryVars</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create request variables for query string data.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_route_1ga0326b013f41e0911bfd8c28f7041f209" class="nameRef">websSetRouteAuth</a>(<a href="#group___webs_route" class="ref">WebsRoute</a> *route, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *authType)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set route authentication scheme.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_route_1ga02ded6cfc279652c2dca6d86f2adc8d8" class="nameRef">websSetRouteMatch</a>(<a href="#group___webs_route" class="ref">WebsRoute</a> *route, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *dir, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *protocol, <a href="#group___webs_hash" class="ref">WebsHash</a> methods, <a href="#group___webs_hash" class="ref">WebsHash</a> extensions, <a href="#group___webs_hash" class="ref">WebsHash</a> abilities, <a href="#group___webs_hash" class="ref">WebsHash</a> redirects)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Configure a route by adding matching criteria.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_session_1ga7392f09b1b9c7d9d230701d6d2636a5e" class="nameRef">websSetSessionVar</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set a session variable name value.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gaef03eccfb6f0d42b34f1a7a90bac62b6" class="nameRef">websSetStatus</a>(<a href="#group___webs" class="ref">Webs</a> *wp, int status)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the response HTTP status code.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga999bb54215bbc7d71c7d6e828fcf49c8" class="nameRef">websSetTxLength</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> length)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set the response body content length.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_auth_1gabf304efa46ec70b19997a6587344c6d1" class="nameRef">websSetUserPassword</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *username, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *password)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set a password for the user.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_auth_1gad77d33b025ea6680b2172f2dac62639b" class="nameRef">websSetUserRoles</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *username, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *roles)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Define the set of roles for a user.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_webs_key" class="ref">WebsKey*</a></td><td><a href="#group___webs_1ga7bc119287019bd62d1db463ea72505b5" class="nameRef">websSetVar</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set a request variable to a string value.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="#struct_webs_key" class="ref">WebsKey*</a></td><td><a href="#group___webs_1gae224484206da359d0c9e0a11469d4b4f" class="nameRef">websSetVarFmt</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Set a request variable to a formatted string value.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_runtime_1ga3d52faf06a56379bb23247aa9a0acb0f" class="nameRef">websStartEvent</a>(int delay, <a href="#group___webs_runtime_1gacc671375a3241fd84d5151c9dd001dc7" class="ref">WebsEventProc</a> proc, void *data)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Start a callback event.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga040b642a888cc259456bacfec4227217" class="nameRef">websStatFile</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="#struct_webs_file_info" class="ref">WebsFileInfo</a> *sbuf)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Get file status for a file.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_runtime_1ga9a6524bc11288246c84651f99fd24425" class="nameRef">websStopEvent</a>(int id)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Stop an event.</td></tr>
<tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_1ga7c1b3749d9f6644db2c7a60d44c453db" class="nameRef">websTempFile</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *dir, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *prefix)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Create a temporary filename This does not guarantee the filename is unique or that it is not already in use by another application.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_1gab42afeb8b16720903e8289fcb9c072ba" class="nameRef">websTestVar</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Test if a request variable is defined.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gafc3db65ebb5f3a86ec0e3ccde56c1f31" class="nameRef">websTimeClose</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Close the date/time parsing module.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga4a94586b4fdeb3c91b1555c3d70151a0" class="nameRef">websTimeOpen</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Open the date/time parsing module.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_upload_1gab33d19bbf16e0437f2210fb832453f0b" class="nameRef">websUploadOpen</a>(void)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Open the file upload filter.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga8c080d18fb0f34cb68759bce48eac7d9" class="nameRef">websUrlParse</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *url, char **buf, char **protocol, char **host, char **port, char **path, char **ext, char **reference, char **query)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Parse a URL into its components.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_1gaebff2db9e8b7a70579082cf92593bcfe" class="nameRef">websValid</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Test if a webs object is valid.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_1gafd15ff2fac3a34650837fec69124b2a2" class="nameRef">websValidUriChars</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *uri)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Test if a URI is using only valid characters Note this does not test if the URI is fully legal.</td></tr>
<tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_1gaf2f303661dab21b74f2ed7c88d741486" class="nameRef">websValidateUriPath</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *uri)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Validate a URI path as expected in a HTTP request line.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_auth_1ga85dd3dca55f2cba94bd02ac206acb70f" class="nameRef">websVerifyPasswordFromCustom</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>User password verification routine from a custom password back-end store.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_auth_1gacf13eed5b4f7dff570f75098a1e34923" class="nameRef">websVerifyPasswordFromFile</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>User password verification routine from auth.txt.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_1gac41407ff97f138db72108cb142258f5e" class="nameRef">websWrite</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Write data to the response.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_1ga9b63519c49d00fae1e06b2c918f970f7" class="nameRef">websWriteBlock</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Write a block of data to the response.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga7b3fddd74796c79f7e41e8bd9ce107a4" class="nameRef">websWriteEndHeaders</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Signify the end of the response headers.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_1gadd0a77daf2fd10766c587c179b09081e" class="nameRef">websWriteFile</a>(int fd, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Write data to the open file.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga34f4159f41e89e67c22a8767d6cd98bb" class="nameRef">websWriteHeader</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Write a response header.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga174c1184ac25621b34337fe47e3be7d6" class="nameRef">websWriteHeaders</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> contentLength, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *redirect)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Write a set of standard response headers.</td></tr>
<tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_1ga8712767b916c5e7a281760ee5d0cbb12" class="nameRef">websWriteSocket</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Write a block of data to the network.</td></tr>
<tr class="apiDef"><td class="apiType">void</td><td><a href="#goahead_8h_1acd2db135e5aacbdc8e6a1f766298b2dd" class="nameRef">wfree</a>(void *blk)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Free an allocated block of memory.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="nameRef">wfreeHandle</a>(void *map, int handle)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Free a handle in the map.</td></tr>
<tr class="apiDef"><td class="apiType">int</td><td><a href="#goahead_8h_1a0cdb01392e19df341254c5b2f593c654" class="nameRef">wopenAlloc</a>(void *buf, int bufsize, int flags)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Initialize the walloc module.</td></tr>
<tr class="apiDef"><td class="apiType">void*</td><td><a href="#goahead_8h_1a7cf93f44c111affc69d877812da50bae" class="nameRef">wrealloc</a>(void *blk, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> newsize)</td></tr><tr class="apiBrief"><td>&nbsp;</td><td>Reallocate a block of memory and grow its size.</td></tr>
</table>
<a name="Typedefs"></a><h1>Typedefs</h1>
<table class="apiIndex" title="typedefs">
<tr class="apiDef"><td class="apiName"><a href="#group___webs_socket_1gae03359f7e0b6d71d55a625ae867c0032" class="nameRef">SocketAccept</a></td><td class="apiBrief">Socket accept callback.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#group___webs_socket_1gabc472a96ad52eed12682302d4f0f5077" class="nameRef">SocketHandler</a></td><td class="apiBrief">Socket I/O callback.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#group___webs_1gacbbbea4092b366e954f77916957cf6c5" class="nameRef">WebsAction</a></td><td class="apiBrief">Action callback.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#group___webs_1ga00798847832d6e6b032e7423a3bf5bb2" class="nameRef">WebsAskLogin</a></td><td class="apiBrief">Callback to prompt the user for their password.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_webs_error" class="nameRef">WebsError</a></td><td class="apiBrief">Error code list.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#group___webs_runtime_1gacc671375a3241fd84d5151c9dd001dc7" class="nameRef">WebsEventProc</a></td><td class="apiBrief">Callback function for events.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_webs_file_info" class="nameRef">WebsFileInfo</a></td><td class="apiBrief">File information structure.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_webs_handler" class="nameRef">WebsHandler</a></td><td class="apiBrief">GoAhead handler object.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#group___webs_1ga6b8f7c9a8138c1c585ec1c2b7aa7a954" class="nameRef">WebsHandlerClose</a></td><td class="apiBrief">GoAhead handler close to release memory prior to shutdown.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#group___webs_1ga1b14d912d52adc694c3c713ec0a17412" class="nameRef">WebsHandlerProc</a></td><td class="apiBrief">GoAhead handler service callback.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="nameRef">WebsHash</a></td><td class="apiBrief">Hash table ID returned by hashCreate.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#group___webs_1ga35aa7f7f128a9d1a4c4f3eeb7849d638" class="nameRef">WebsJstProc</a></td><td class="apiBrief">Javascript native function.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#goahead_8h_1ab4a2aa1bcdb9d47e37c84baa32cbf5fb" class="nameRef">WebsLogHandler</a></td><td class="apiBrief">Callback for emitting trace log output.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_webs_mime" class="nameRef">WebsMime</a></td><td class="apiBrief">Mime type list.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#group___webs_1ga8813a82488191e0cb2df0f7cafcd1414" class="nameRef">WebsParseAuth</a></td><td class="apiBrief">Callback to parse authentication details submitted with the web request.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_webs_role" class="nameRef">WebsRole</a></td><td class="apiBrief">Role definition structure.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_webs_rom_index" class="nameRef">WebsRomIndex</a></td><td class="apiBrief">Compiled Rom Page Index.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#goahead_8h_1a3a874b92bbb07540254ed16567db3aa3" class="nameRef">WebsStat</a></td><td class="apiBrief">File status structure.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#goahead_8h_1acdd9aaf80c8e9b08b3cf94200c91a6ae" class="nameRef">WebsTime</a></td><td class="apiBrief">System native time type.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_webs_user" class="nameRef">WebsUser</a></td><td class="apiBrief">User definition structure.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#struct_webs_value" class="nameRef">WebsValue</a></td><td class="apiBrief">Value union to store primitive value types.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#group___webs_1ga196a6343b64e6944f3b77b8af709a7e8" class="nameRef">WebsVerify</a></td><td class="apiBrief">Callback to verify the username and password.</td></tr>
<tr class="apiDef"><td class="apiName"><a href="#goahead_8h_1ab831e30480b27feb88a15c09f382719f" class="nameRef">WebsWriteProc</a></td><td class="apiBrief">Callback for write I/O events.</td></tr>
</table>
<a name="Defines"></a><h1>Defines</h1>
<table class="apiIndex" title="Defines">
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a1efdfd58d322aa536b75deecf922f1c8" class="nameRef">HTTP_CODE_ACCEPTED</a>&nbsp;&nbsp;&nbsp;202</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The request has been accepted and processing is continuing.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a0af0302aed58ea49fd6b1be26179585c" class="nameRef">HTTP_CODE_BAD_GATEWAY</a>&nbsp;&nbsp;&nbsp;502</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The server cannot act as a gateway for the given request.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a8b9b86ec8ac18bf9e606f22c0921dd4a" class="nameRef">HTTP_CODE_BAD_METHOD</a>&nbsp;&nbsp;&nbsp;405</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The request HTTP method was not supported by the resource.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a16c7e21f17349c2515fe0134f9b7ffd4" class="nameRef">HTTP_CODE_BAD_REQUEST</a>&nbsp;&nbsp;&nbsp;400</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The request is malformed.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1aa7dc3796cad07c52f3db7ed660948405" class="nameRef">HTTP_CODE_BAD_VERSION</a>&nbsp;&nbsp;&nbsp;505</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The server does not support the HTTP protocol version.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1ac4e84c07da5d5314255265a9470004fe" class="nameRef">HTTP_CODE_COMMS_ERROR</a>&nbsp;&nbsp;&nbsp;550</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The server had a communications error responding to the client.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a33cde539885f920737a6c148f854aa15" class="nameRef">HTTP_CODE_CONFLICT</a>&nbsp;&nbsp;&nbsp;409</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The request had a conflict in the request headers and URI.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1ad1f324698e12fefadfc2ec5d16ce6a5b" class="nameRef">HTTP_CODE_CONTINUE</a>&nbsp;&nbsp;&nbsp;100</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Continue with request, only partial content transmitted.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a00c11c6c6bf42cf1fb483c273454cf45" class="nameRef">HTTP_CODE_CREATED</a>&nbsp;&nbsp;&nbsp;201</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The request has completed and a new resource was created.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a7b7785ff11163b18f12bc2d66f728abe" class="nameRef">HTTP_CODE_EXPECTATION_FAILED</a>&nbsp;&nbsp;&nbsp;417</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The server cannot satisfy the Expect header requirements.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1ac68e0a1d868dad52967d757dab5220db" class="nameRef">HTTP_CODE_FORBIDDEN</a>&nbsp;&nbsp;&nbsp;403</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The request was legal, but the server refuses to process.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1ab24790eefb565c4e7064438592e32204" class="nameRef">HTTP_CODE_GATEWAY_TIMEOUT</a>&nbsp;&nbsp;&nbsp;504</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The server gateway timed out waiting for the upstream server.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a0eeb0f3801fbd1ca5d0f050e12426768" class="nameRef">HTTP_CODE_GONE</a>&nbsp;&nbsp;&nbsp;410</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The requested resource is no longer available.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1af7fab487ecc4f937304ff5ad1fd97330" class="nameRef">HTTP_CODE_INSUFFICIENT_STORAGE</a>&nbsp;&nbsp;&nbsp;507</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The server has insufficient storage to complete the request.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a6d47746cc8b934944ed4f05308b2da63" class="nameRef">HTTP_CODE_INTERNAL_SERVER_ERROR</a>&nbsp;&nbsp;&nbsp;500</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Server processing or configuration error.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1af92be73f22cd3758211ce5b90ec64572" class="nameRef">HTTP_CODE_LENGTH_REQUIRED</a>&nbsp;&nbsp;&nbsp;411</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The request did not specify a required content length.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a3d8f6601017c97af5fe8bd5267be8b02" class="nameRef">HTTP_CODE_MOVED_PERMANENTLY</a>&nbsp;&nbsp;&nbsp;301</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The requested URI has moved permanently to a new location.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a33f32423ccbf3a2a61f56cc5aee18cd8" class="nameRef">HTTP_CODE_MOVED_TEMPORARILY</a>&nbsp;&nbsp;&nbsp;302</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The URI has moved temporarily to a new location.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a7e41c8a47383e2bdf4b34ce5510bc9b6" class="nameRef">HTTP_CODE_NO_CONTENT</a>&nbsp;&nbsp;&nbsp;204</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The request has completed and there is no response to send.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a1159b67860d06bcce578f8d4d0083070" class="nameRef">HTTP_CODE_NO_RESPONSE</a>&nbsp;&nbsp;&nbsp;444</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The connection was closed with no response to the client.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1aa44abbf9540845f062801eb5bff8a128" class="nameRef">HTTP_CODE_NOT_ACCEPTABLE</a>&nbsp;&nbsp;&nbsp;406</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The requested resource cannot generate the required content.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a0a20b658e0dc1c0634a4eb5b07b36d52" class="nameRef">HTTP_CODE_NOT_AUTHORITATIVE</a>&nbsp;&nbsp;&nbsp;203</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The request has completed but content may be from another source.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a20eb5cc8af538c827de0f7ed9811243c" class="nameRef">HTTP_CODE_NOT_FOUND</a>&nbsp;&nbsp;&nbsp;404</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The requested resource was not found.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a9e272d1190eb37ce4447a9021f68a0c4" class="nameRef">HTTP_CODE_NOT_IMPLEMENTED</a>&nbsp;&nbsp;&nbsp;501</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The server does not recognize the request or method.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a225a5999b63c699c4492a8412b315452" class="nameRef">HTTP_CODE_NOT_MODIFIED</a>&nbsp;&nbsp;&nbsp;304</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The requested resource has changed since the last request.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a471de168f41ecf5e8d62a43fea28b5d7" class="nameRef">HTTP_CODE_OK</a>&nbsp;&nbsp;&nbsp;200</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The request completed successfully.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1ae55f28c554e19bbddaba95fdb81c90e0" class="nameRef">HTTP_CODE_PARTIAL</a>&nbsp;&nbsp;&nbsp;206</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The request has completed and is returning partial content.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1ab772ef28d09ec65afdfc7b67ca29c4b8" class="nameRef">HTTP_CODE_PAYMENT_REQUIRED</a>&nbsp;&nbsp;&nbsp;402</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Reserved for future use.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a9b62630f040b66859f1b08380ac52250" class="nameRef">HTTP_CODE_PRECOND_FAILED</a>&nbsp;&nbsp;&nbsp;412</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The server cannot satisfy one of the request preconditions.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1abf878ed6908fa91fca3138731e7033a2" class="nameRef">HTTP_CODE_RANGE_NOT_SATISFIABLE</a>&nbsp;&nbsp;&nbsp;416</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The request content range does not exist for the resource.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1aac7ff73346b1a2812e6b2cde68ace003" class="nameRef">HTTP_CODE_REQUEST_TIMEOUT</a>&nbsp;&nbsp;&nbsp;408</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The server timed out waiting for the request to complete.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a9d41ec497841c29d86a1b9ef93a6316d" class="nameRef">HTTP_CODE_REQUEST_TOO_LARGE</a>&nbsp;&nbsp;&nbsp;413</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The request is too large for the server to process.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a4b04fb7856d5d412df31b0d9528d6191" class="nameRef">HTTP_CODE_REQUEST_URL_TOO_LARGE</a>&nbsp;&nbsp;&nbsp;414</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The request URI is too long for the server to process.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1aab1d80e99e8e1db0a8a4531c69f037c9" class="nameRef">HTTP_CODE_RESET</a>&nbsp;&nbsp;&nbsp;205</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The request has completed with no content.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a81767ddf9b55cb683935842e67b93680" class="nameRef">HTTP_CODE_SEE_OTHER</a>&nbsp;&nbsp;&nbsp;303</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The requested URI can be found at another URI location.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a00a05677bf92a38abf5be28b5ce0d294" class="nameRef">HTTP_CODE_SERVICE_UNAVAILABLE</a>&nbsp;&nbsp;&nbsp;503</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The server is currently unavailable or overloaded.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a12036a2f5ae164e644d3a063864cb1a1" class="nameRef">HTTP_CODE_TEMPORARY_REDIRECT</a>&nbsp;&nbsp;&nbsp;307</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The request should be repeated at another URI location.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a4667745cca24cb084488393a562647aa" class="nameRef">HTTP_CODE_UNAUTHORIZED</a>&nbsp;&nbsp;&nbsp;401</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Authentication for the request has failed.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1ad0f303cb6433d273adbfd7a8db38f720" class="nameRef">HTTP_CODE_UNSUPPORTED_MEDIA_TYPE</a>&nbsp;&nbsp;&nbsp;415</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The request media type is not supported by the server or resource.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a368ec3a2d7da1dc0a43de55c829ae97b" class="nameRef">HTTP_CODE_USE_PROXY</a>&nbsp;&nbsp;&nbsp;305</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The requested resource must be accessed via the location proxy.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1aee091362584fd5f1b74019bee924bfbb" class="nameRef">ME_MAX_IP</a>&nbsp;&nbsp;&nbsp;64</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Maximum IP address size.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a85ee14e72ab035c35530a02e9f6a1859" class="nameRef">SOCKET_AGAIN</a>&nbsp;&nbsp;&nbsp;4</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Issue the request again.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a6db72d1b78eff6c606633c46190078dc" class="nameRef">SOCKET_ASYNC</a>&nbsp;&nbsp;&nbsp;0x8</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Use async connect.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a15bfb9f8b3f96c54b4121ddc58018b08" class="nameRef">SOCKET_BLOCK</a>&nbsp;&nbsp;&nbsp;0x10</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Use blocking I/O.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a54d9954c6658013ffaf6a745b530f9f5" class="nameRef">SOCKET_BUFFERED_READ</a>&nbsp;&nbsp;&nbsp;0x200</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Message pending on this socket.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1adabe453ca2913d78fc8bbc5a4c91a455" class="nameRef">SOCKET_BUFFERED_WRITE</a>&nbsp;&nbsp;&nbsp;0x400</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Message pending on this socket.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a2e950af59def710c7fc0745860e2ed2a" class="nameRef">SOCKET_CLOSING</a>&nbsp;&nbsp;&nbsp;0x40</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Socket is closing.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a77b85be920c891600f978c675884fa7c" class="nameRef">SOCKET_CONNECTING</a>&nbsp;&nbsp;&nbsp;0x2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Connect in progress.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a46f9c219ce9e6e0198c95b091ae49d92" class="nameRef">SOCKET_CONNRESET</a>&nbsp;&nbsp;&nbsp;0x80</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Socket connection was reset.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1abefba48844b9ab23b89c3a7736ef0778" class="nameRef">SOCKET_EOF</a>&nbsp;&nbsp;&nbsp;0x1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Seen end of file.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a5b1aa2c0ae9c92a40413887ef6c51448" class="nameRef">SOCKET_EXCEPTION</a>&nbsp;&nbsp;&nbsp;0x8</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Interested in exceptions.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a95fa0331fc156e74ab809345d76c3760" class="nameRef">SOCKET_HANDSHAKING</a>&nbsp;&nbsp;&nbsp;0x100</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Doing SSL handshake.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1acde08b14ccbd79f650c92bc209d6026b" class="nameRef">SOCKET_INTR</a>&nbsp;&nbsp;&nbsp;5</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Call was interrupted.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a9815fe10f80b45a92172de59bc8effb4" class="nameRef">SOCKET_INVAL</a>&nbsp;&nbsp;&nbsp;6</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Invalid.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1ae817478fd76f7c8ab0e4cb4afd2fdbe7" class="nameRef">SOCKET_LISTENING</a>&nbsp;&nbsp;&nbsp;0x20</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Socket is server listener.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a4ca860e3aca64e92a0efb6dfa76c4bc5" class="nameRef">SOCKET_NETDOWN</a>&nbsp;&nbsp;&nbsp;3</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Network is down.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1ad5ce2512b2ef7ec98f3a3d75388de7fd" class="nameRef">SOCKET_NODELAY</a>&nbsp;&nbsp;&nbsp;0x800</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Disable Nagle algorithm.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1ad138fc891e1a07ca7be084c13140a750" class="nameRef">SOCKET_PORT_MAX</a>&nbsp;&nbsp;&nbsp;0xffff</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Max Port size.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a8b56e2a409b2468f527d17c5e82cbea6" class="nameRef">SOCKET_READABLE</a>&nbsp;&nbsp;&nbsp;0x2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Make socket readable.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a2cd104f31be96aaa2d1d3a2386682430" class="nameRef">SOCKET_RESERVICE</a>&nbsp;&nbsp;&nbsp;0x4</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Socket needs re-servicing.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1ab8aedcb785ff519c36d26ec43a8e95d7" class="nameRef">SOCKET_RESET</a>&nbsp;&nbsp;&nbsp;2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Socket has been reset.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1ad82a8f322ed6b5db8563862d9dc78454" class="nameRef">SOCKET_WOULDBLOCK</a>&nbsp;&nbsp;&nbsp;1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Socket would block on I/O.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a200ee94b56ff93dfbe869aeebeb0f2ed" class="nameRef">SOCKET_WRITABLE</a>&nbsp;&nbsp;&nbsp;0x4</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Make socket writable.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1ad67de85ec9f1c5f73e756af3054bd78b" class="nameRef">VALUE_ALLOCATE</a>&nbsp;&nbsp;&nbsp;0x1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Allocate strings using malloc.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a341a7720a9020d6a29fd77b540422579" class="nameRef">value_numeric</a>&nbsp;&nbsp;&nbsp;(t &gt;= byteint &amp;&amp; t &lt;= big)</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The value is a numeric type.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1ac0bedfb6f2b538f9459d04e0d60e2935" class="nameRef">value_ok</a>&nbsp;&nbsp;&nbsp;(t &gt; undefined &amp;&amp; t &lt;= symbol)</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The value is valid supported type.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a0c4fe8ad2c4157463c53d540b526a7db" class="nameRef">value_str</a>&nbsp;&nbsp;&nbsp;(t &gt;= string &amp;&amp; t &lt;= bytes)</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>The value is a string type.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1aadc5370e3a0792f775995331b9da51cb" class="nameRef">WEBS_ACCEPTED</a>&nbsp;&nbsp;&nbsp;0x1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>TLS connection accepted.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a6b611de53ee235ac552b2cd87750955d" class="nameRef">WEBS_ASSERT_MSG</a>&nbsp;&nbsp;&nbsp;0x10</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Originated from assert.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a4d8188c7828dfb02d45653a83b3761d6" class="nameRef">WEBS_BEGIN</a>&nbsp;&nbsp;&nbsp;0</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Beginning state.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1ae0e37be791db29aacc26b899596f21c6" class="nameRef">WEBS_CHUNK_DATA</a>&nbsp;&nbsp;&nbsp;3</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Start of chunk data.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a599da0f60dabc762dbf1a6b303bd6cab" class="nameRef">WEBS_CHUNK_HEADER</a>&nbsp;&nbsp;&nbsp;2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Preparing tx chunk header.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1ae8a0189bb1a76bacdd40f3e448486dbd" class="nameRef">WEBS_CHUNK_START</a>&nbsp;&nbsp;&nbsp;1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Start of a new chunk.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a2ef42bef1fe656be2d208c3116c75d23" class="nameRef">WEBS_CHUNK_UNCHUNKED</a>&nbsp;&nbsp;&nbsp;0</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Data is not transfer-chunk encoded.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a7cdb57c12b6fb4c9a4cde3e0c51af3a7" class="nameRef">WEBS_CHUNKING</a>&nbsp;&nbsp;&nbsp;0x2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Currently chunking output body data.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a798cdf39a853d9d287a10c6d7d8d0f0c" class="nameRef">WEBS_CLOSE</a>&nbsp;&nbsp;&nbsp;0x20000</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Close connection.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1aaa3cf9edabf08d9e8d7c679e82c04c82" class="nameRef">WEBS_CLOSED</a>&nbsp;&nbsp;&nbsp;0x4</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Connection closed, ready to free.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a5803d77a5e168a028219e5d37e8453e5" class="nameRef">WEBS_CODE_MASK</a>&nbsp;&nbsp;&nbsp;0xFFFF</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Mask valid status codes.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a0f6ea1e528550a08c75510244019623d" class="nameRef">WEBS_COMPLETE</a>&nbsp;&nbsp;&nbsp;4</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Request complete.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a372d1bd70d208f72ede723046493fbcd" class="nameRef">WEBS_CONFIG</a>&nbsp;&nbsp;&nbsp;2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Configuration settings trace level.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a0d9a3cace663a786a25612d4ea507d4d" class="nameRef">WEBS_CONTENT</a>&nbsp;&nbsp;&nbsp;1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Ready for body data.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1aae31b3bad03626c2cddc014fb995d947" class="nameRef">WEBS_COOKIE</a>&nbsp;&nbsp;&nbsp;0x8</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Cookie supplied in request.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a0542132a4a1e922f07cedb9fc62345af" class="nameRef">WEBS_COOKIE_HTTP</a>&nbsp;&nbsp;&nbsp;0x2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Flag for websSetCookie for http cookies (http only).</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1ac781b97e1ab0c4c56f9c260503845574" class="nameRef">WEBS_COOKIE_SAME_LAX</a>&nbsp;&nbsp;&nbsp;0x4</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Flag for websSetCookie for SameSite=Lax.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a84086482ebed4821bc2304f1319ecf12" class="nameRef">WEBS_COOKIE_SAME_STRICT</a>&nbsp;&nbsp;&nbsp;0x8</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Flag for websSetCookie for SameSite=Strict.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1ab4d2a11360e7f9acdfc46d917d6c2695" class="nameRef">WEBS_COOKIE_SECURE</a>&nbsp;&nbsp;&nbsp;0x1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Flag for websSetCookie for secure cookies (https only).</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a1646430a51608c0851ea5beae48a2b59" class="nameRef">WEBS_DECODE_TOKEQ</a>&nbsp;&nbsp;&nbsp;1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Decode base 64 blocks up to a NULL or equals.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1abe62c79451680724ff4cb5d15c8eb4d0" class="nameRef">WEBS_ERROR</a>&nbsp;&nbsp;&nbsp;1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Standard logging trace levels are 0 to 9 with 0 being the most verbose.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1afe57ae729fd2df14f7f60dd621797f35" class="nameRef">WEBS_ERROR_MSG</a>&nbsp;&nbsp;&nbsp;0x20</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Originated from error.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a52a69dfd87586752955431da82cb93f4" class="nameRef">WEBS_FINALIZED</a>&nbsp;&nbsp;&nbsp;0x10</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Output is finalized.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a07b35d14e2525658fe2e57c4a2ba8b86" class="nameRef">WEBS_FORM</a>&nbsp;&nbsp;&nbsp;0x20</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Request is a form (url encoded data).</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a99e42945b85f2f9946f3db27ca0e92e9" class="nameRef">WEBS_HEADERS_CREATED</a>&nbsp;&nbsp;&nbsp;0x40</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Headers have been created and buffered.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1ac91876c9dd625cfacab287b19963b3be" class="nameRef">WEBS_HTTP11</a>&nbsp;&nbsp;&nbsp;0x80</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Request is using HTTP/1.1.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a2f030fa0b014ba8dcaa67aae493750b5" class="nameRef">WEBS_JSON</a>&nbsp;&nbsp;&nbsp;0x100</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Request has a JSON payload.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1ab4d91d57c30dbfe518be10b0e28eb237" class="nameRef">WEBS_KEEP_ALIVE</a>&nbsp;&nbsp;&nbsp;0x200</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>HTTP/1.1 keep alive.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1ae6d0c0d34e9e57dd42fc447807d3fc84" class="nameRef">WEBS_LEVEL_MASK</a>&nbsp;&nbsp;&nbsp;0xF</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Level mask.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1aa89bb6f9f5ce05683bc6d36a814aa1b7" class="nameRef">WEBS_LOG_MSG</a>&nbsp;&nbsp;&nbsp;0x100</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Originated from logmsg.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a25bcde7fa767594ca76c2f657565152d" class="nameRef">WEBS_MAX_LISTEN</a>&nbsp;&nbsp;&nbsp;8</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Maximum number of listen endpoints.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1ac2cd905dd716db4a61d7695c8b13d5ee" class="nameRef">WEBS_MAX_PASSWORD</a>&nbsp;&nbsp;&nbsp;32</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Default maximum password.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a65b56de5c558a48c5167471245b82987" class="nameRef">WEBS_NOLOG</a>&nbsp;&nbsp;&nbsp;0x40000</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Don&apos;t write error to log.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a7c2fa959a96c4040aa551cf9ddd0753c" class="nameRef">WEBS_RAW_MSG</a>&nbsp;&nbsp;&nbsp;0x200</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Raw message output.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a43ffc2adb5fe2908fd3757029d070313" class="nameRef">WEBS_READY</a>&nbsp;&nbsp;&nbsp;2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Ready to route and start handler.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1af97a00bf1e3283dd14196e29005796b5" class="nameRef">WEBS_REROUTE</a>&nbsp;&nbsp;&nbsp;0x400</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Restart route matching.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1affca463a40f2f7aee71a6bcd909906d6" class="nameRef">WEBS_RESPONSE_TRACED</a>&nbsp;&nbsp;&nbsp;0x800</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Started tracing the response.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a8c49bc25464dbfbdf0b45b84be4ebb5d" class="nameRef">WEBS_RUNNING</a>&nbsp;&nbsp;&nbsp;3</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Processing request.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a166e115282d96ae40b39515a2fff9772" class="nameRef">WEBS_SECURE</a>&nbsp;&nbsp;&nbsp;0x1000</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Connection uses SSL.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a74710a46052fef4648a4192538741a0a" class="nameRef">WEBS_SMALL_HASH</a>&nbsp;&nbsp;&nbsp;31</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>General small hash size.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a3acc26f07aa103879649afa4ad81fc4e" class="nameRef">WEBS_TRACE_MSG</a>&nbsp;&nbsp;&nbsp;0x400</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Originated from trace.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a97b3ad9c701c52137117f6d82702895a" class="nameRef">WEBS_TRIM_BOTH</a>&nbsp;&nbsp;&nbsp;0x3</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Flag for strim to trim from both the start and the end of the string.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1acd059bb8f02892cb0093e5bb7c13c99a" class="nameRef">WEBS_TRIM_END</a>&nbsp;&nbsp;&nbsp;0x2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Flag for strim to trim from the end of the string.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1ad185deb88c41c92632f330d3191f73af" class="nameRef">WEBS_TRIM_START</a>&nbsp;&nbsp;&nbsp;0x1</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Flag for strim to trim from the start of the string.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1af5bbd57723f7a60b90ac58a2b56ca7f1" class="nameRef">WEBS_UPLOAD</a>&nbsp;&nbsp;&nbsp;0x2000</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Multipart-mime file upload.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a876b6dcf5241c4052f16ebdf2a69be21" class="nameRef">WEBS_VARS_ADDED</a>&nbsp;&nbsp;&nbsp;0x4000</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Query and body form vars added.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a8a69332ca259f6a5ee5e7dd145f254b2" class="nameRef">WEBS_VERBOSE</a>&nbsp;&nbsp;&nbsp;9</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Highest level of trace.</td></tr>
<tr class="apiDef">
<td>#define</td><td><a href="#goahead_8h_1a971517f9ec706c960482115682b44653" class="nameRef">WEBS_WARN</a>&nbsp;&nbsp;&nbsp;2</td>
</tr>
<tr class="apiBrief"><td>&nbsp;</td><td>Soft warning trace level.</td></tr>
  </table>
<h1>Webs</h1>
<a name="group___webs"></a>
<div class="api">
  <div class="prototype">Webs</div>
  <div class="apiDetail">
<p>GoAhead request structure.</p>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">char *</td><td><td>authDetails</td><td>
Http header auth details.
</td>
    <tr><td class="param">char *</td><td><td>authResponse</td><td>
Outgoing auth header.
</td>
    <tr><td class="param">char *</td><td><td>authType</td><td>
Authorization type (Basic/DAA).
</td>
    <tr><td class="param">char *</td><td><td>boundary</td><td>
Mime boundary (static).
</td>
    <tr><td class="param">ssize</td><td><td>boundaryLen</td><td>
Boundary length.
</td>
    <tr><td class="param">int</td><td><td>cgifd</td><td>
File handle for CGI program input.
</td>
    <tr><td class="param">char *</td><td><td>cgiStdin</td><td>
Filename for CGI program input.
</td>
    <tr><td class="param">WebsBuf</td><td><td>chunkbuf</td><td>
Pre-chunking data buffer.
</td>
    <tr><td class="param">char *</td><td><td>clientFilename</td><td>
Current file filename.
</td>
    <tr><td class="param">int</td><td><td>code</td><td>
Response status code.
</td>
    <tr><td class="param">uint</td><td><td>connError</td><td>
Request has a connection error.
</td>
    <tr><td class="param">char *</td><td><td>contentType</td><td>
Body content type.
</td>
    <tr><td class="param">char *</td><td><td>cookie</td><td>
Request cookie string.
</td>
    <tr><td class="param">WebsUpload *</td><td><td>currentFile</td><td>
Current file context.
</td>
    <tr><td class="param">char *</td><td><td>decodedQuery</td><td>
Decoded request query.
</td>
    <tr><td class="param">char *</td><td><td>digest</td><td>
Password digest.
</td>
    <tr><td class="param">int</td><td><td>docfd</td><td>
File descriptor for document being served.
</td>
    <tr><td class="param">int</td><td><td>encoded</td><td>
True if the password is MD5(username:realm:password).
</td>
    <tr><td class="param">bool</td><td><td>eof</td><td>
If at the end of the request content.
</td>
    <tr><td class="param">uint</td><td><td>error</td><td>
Request has an error.
</td>
    <tr><td class="param">char *</td><td><td>ext</td><td>
Path extension.
</td>
    <tr><td class="param">char *</td><td><td>filename</td><td>
Document path name.
</td>
    <tr><td class="param">WebsHash</td><td><td>files</td><td>
Uploaded files.
</td>
    <tr><td class="param">uint</td><td><td>finalized</td><td>
Request has been completed.
</td>
    <tr><td class="param">int</td><td><td>flags</td><td>
Current flags <ndash/> see above.
</td>
    <tr><td class="param">char *</td><td><td>host</td><td>
Requested host.
</td>
    <tr><td class="param">char</td><td><td>ifaddr[ME_MAX_IP]</td><td>
Local interface ipaddress.
</td>
    <tr><td class="param">WebsBuf</td><td><td>input</td><td>
Receive buffer after de-chunking.
</td>
    <tr><td class="param">char</td><td><td>ipaddr[ME_MAX_IP]</td><td>
Connecting ipaddress.
</td>
    <tr><td class="param">ssize</td><td><td>lastRead</td><td>
Number of bytes last read from the socket.
</td>
    <tr><td class="param">int</td><td><td>listenSid</td><td>
Listen Socket id.
</td>
    <tr><td class="param">char *</td><td><td>method</td><td>
HTTP request method.
</td>
    <tr><td class="param">WebsBuf</td><td><td>output</td><td>
Transmit buffer after chunking.
</td>
    <tr><td class="param">char *</td><td><td>password</td><td>
Authorization password.
</td>
    <tr><td class="param">char *</td><td><td>path</td><td>
Path name without query. 
This is decoded.
</td>
    <tr><td class="param">int</td><td><td>port</td><td>
Request port number.
</td>
    <tr><td class="param">char *</td><td><td>protocol</td><td>
Protocol scheme (normally http|https).
</td>
    <tr><td class="param">char *</td><td><td>protoVersion</td><td>
Protocol version (HTTP/1.1).
</td>
    <tr><td class="param">ssize</td><td><td>putLen</td><td>
Bytes read by a PUT request.
</td>
    <tr><td class="param">char *</td><td><td>putname</td><td>
PUT temporary filename.
</td>
    <tr><td class="param">char *</td><td><td>query</td><td>
Request query. 
This is decoded.
</td>
    <tr><td class="param">char *</td><td><td>realm</td><td>
Realm field supplied in auth header.
</td>
    <tr><td class="param">char *</td><td><td>referrer</td><td>
The referring page.
</td>
    <tr><td class="param">WebsHash</td><td><td>responseCookies</td><td>
Outgoing cookies.
</td>
    <tr><td class="param">struct WebsRoute *</td><td><td>route</td><td>
Request route.
</td>
    <tr><td class="param">int</td><td><td>routeCount</td><td>
Route count limiter.
</td>
    <tr><td class="param">WebsBuf</td><td><td>rxbuf</td><td>
Raw receive buffer.
</td>
    <tr><td class="param">ssize</td><td><td>rxChunkSize</td><td>
Rx chunk size.
</td>
    <tr><td class="param">int</td><td><td>rxChunkState</td><td>
Rx chunk encoding state.
</td>
    <tr><td class="param">char *</td><td><td>rxEndp</td><td>
Pointer to end of raw data in input beyond endp.
</td>
    <tr><td class="param">ssize</td><td><td>rxLen</td><td>
Rx content length.
</td>
    <tr><td class="param">ssize</td><td><td>rxRemaining</td><td>
Remaining content to read from client.
</td>
    <tr><td class="param">struct WebsSession *</td><td><td>session</td><td>
Session record.
</td>
    <tr><td class="param">int</td><td><td>sid</td><td>
Socket id (handler).
</td>
    <tr><td class="param">WebsTime</td><td><td>since</td><td>
Parsed if-modified-since time.
</td>
    <tr><td class="param">void *</td><td><td>ssl</td><td>
SSL context.
</td>
    <tr><td class="param">int</td><td><td>state</td><td>
Current state.
</td>
    <tr><td class="param">int</td><td><td>timeout</td><td>
Timeout handle.
</td>
    <tr><td class="param">WebsTime</td><td><td>timestamp</td><td>
Last transaction with browser.
</td>
    <tr><td class="param">ssize</td><td><td>txChunkLen</td><td>
Length of the chunk.
</td>
    <tr><td class="param">char</td><td><td>txChunkPrefix[16]</td><td>
Transmit chunk prefix.
</td>
    <tr><td class="param">ssize</td><td><td>txChunkPrefixLen</td><td>
Length of prefix.
</td>
    <tr><td class="param">char *</td><td><td>txChunkPrefixNext</td><td>
Current I/O pos in txChunkPrefix.
</td>
    <tr><td class="param">int</td><td><td>txChunkState</td><td>
Transmit chunk state.
</td>
    <tr><td class="param">ssize</td><td><td>txLen</td><td>
Tx content length header value.
</td>
    <tr><td class="param">ssize</td><td><td>txRemaining</td><td>
Remaining content to write.
</td>
    <tr><td class="param">int</td><td><td>upfd</td><td>
Upload file handle.
</td>
    <tr><td class="param">int</td><td><td>uploadState</td><td>
Current file upload state.
</td>
    <tr><td class="param">char *</td><td><td>uploadTmp</td><td>
Current temp filename for upload data.
</td>
    <tr><td class="param">char *</td><td><td>uploadVar</td><td>
Current upload form variable name.
</td>
    <tr><td class="param">char *</td><td><td>url</td><td>
Full request url. 
This is not decoded.
</td>
    <tr><td class="param">struct <a class="ref" href="#struct_webs_user">WebsUser</a> *</td><td><td>user</td><td>
User auth record.
</td>
    <tr><td class="param">char *</td><td><td>userAgent</td><td>
User agent (browser).
</td>
    <tr><td class="param">char *</td><td><td>username</td><td>
Authorization username.
</td>
    <tr><td class="param">WebsHash</td><td><td>vars</td><td>
CGI standard variables.
</td>
    <tr><td class="param">int</td><td><td>wid</td><td>
Index into webs.
</td>
    <tr><td class="param">WebsWriteProc</td><td><td>writeData</td><td>
Handler write I/O event callback. 
Used by fileHandler.
</td>
    <tr><td class="param">ssize</td><td><td>written</td><td>
Bytes actually transferred.
</td>
    </table></dd></dl>
  </div>
</div>
<a name="group___webs_1ga7e6149e63a2f4ad6fc53ac6ac60cec1a"></a>
<div class="api">
  <div class="prototype">
    void
    sslClose
(void )
  </div>
  <div class="apiDetail">
<p>Close the ssl module.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gaeebef5121f49387a67fc33de42aefffe"></a>
<div class="api">
  <div class="prototype">
    void
    sslFree
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Free a ssl connection associated with a request.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga81e8547c8bf48f6b74e0ea2fab0a296c"></a>
<div class="api">
  <div class="prototype">
    int
    sslOpen
(void )
  </div>
  <div class="apiDetail">
<p>Open the ssl module.</p>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga8063a955fe7c9d4f3f1ccb036d186835"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    sslRead
(<a href="#group___webs" class="ref">Webs</a> *wp, void *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)
  </div>
  <div class="apiDetail">
<p>Read data from a secure socket.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">buf</td><td>Buffer into which to read data.</td>
    <tr><td class="param">len</td><td>Size of buf.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Count of bytes read if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga0ceefc6dfb2a71dec6c5a18b37097c64"></a>
<div class="api">
  <div class="prototype">
    int
    sslUpgrade
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Upgrade a request connection to utilize SSL.</p>
    <dl><dt><b>Description</b>:</dt><dd>This routine is invoked on a connection received on a secure listening socket.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gaf190d807759ac01cad747d013b1893cf"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    sslWrite
(<a href="#group___webs" class="ref">Webs</a> *wp, void *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)
  </div>
  <div class="apiDetail">
<p>WRite data to a secure socket.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">buf</td><td>Buffer from which to write data.</td>
    <tr><td class="param">len</td><td>Size of buf.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Count of bytes written if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga0a02508940140401b730219dba7295d5"></a>
<div class="api">
  <div class="prototype">
    int
    websAccept
(int sid, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ipaddr, int port, int listenSid)
  </div>
  <div class="apiDetail">
<p>Accept a new connection.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sid</td><td>Socket ID handle for the newly accepted socket.</td>
    <tr><td class="param">ipaddr</td><td>IP address originating the connection.</td>
    <tr><td class="param">port</td><td>Port number originating the connection.</td>
    <tr><td class="param">listenSid</td><td>Socket ID of the listening socket.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gaf903a6d7928616f803d294de73f8cd11"></a>
<div class="api">
  <div class="prototype">
    void
    websActionOpen
(void )
  </div>
  <div class="apiDetail">
<p>Open the action handler.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga069bb8b6d336ca5f8ea2f3b8c113371b"></a>
<div class="api">
  <div class="prototype">
    int
    websAlloc
(int sid)
  </div>
  <div class="apiDetail">
<p>Allocate a new Webs object.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sid</td><td>Socket ID handle for the newly accepted socket.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The webs[] handle index for the allocated Webs object.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gad02e7e70e4f3b7bca1ee2a318a336e80"></a>
<div class="api">
  <div class="prototype">
    void
    websCancelTimeout
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Cancel the request timeout.</p>
    <dl><dt><b>Description</b>:</dt><dd>Handlers may choose to manually manage the request timeout. This routine will disable the centralized management of the timeout for this request.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gac05856f3dd04aeef0732570bedf044ad"></a>
<div class="api">
  <div class="prototype">
    int
    websCgiHandler
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>CGI handler service callback.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs object.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns 1 if the request was handled.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gae908f662db14b2f0571634f48dda790c"></a>
<div class="api">
  <div class="prototype">
    int
    websCgiOpen
(void )
  </div>
  <div class="apiDetail">
<p>Open the CGI handler.</p>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gac14f9e9acabae760c4225c6a372747a5"></a>
<div class="api">
  <div class="prototype">
    int
    websCgiPoll
(void )
  </div>
  <div class="apiDetail">
<p>Poll for output from CGI processes and output.</p>
    <dl><dt>Returns:</dt><dd>Time delay till next poll.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga94471225b733c21ebe13449aed71cf98"></a>
<div class="api">
  <div class="prototype">
    void
    websClose
(void )
  </div>
  <div class="apiDetail">
<p>Close the core GoAhead web server module.</p>
    <dl><dt><b>Description</b>:</dt><dd>Invoked when GoAhead is shutting down.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gac3d3297f51f566d7dcd0c1003180f210"></a>
<div class="api">
  <div class="prototype">
    void
    websCloseFile
(int fd)
  </div>
  <div class="apiDetail">
<p>Close an open file.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">fd</td><td>Open file handle returned by websOpenFile.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga2ebc310e8ccbfd0e52a29d5f8d192b13"></a>
<div class="api">
  <div class="prototype">
    int
    websCompareVar
(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *var, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value)
  </div>
  <div class="apiDetail">
<p>Compare a request variable.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">var</td><td>Variable name.</td>
    <tr><td class="param">value</td><td>Value to compare with.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the value matches. Otherwise return 0.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga6e0b2ea7b62d847fd10d7bb761d1189e"></a>
<div class="api">
  <div class="prototype">
    void
    websConsumeInput
(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> nbytes)
  </div>
  <div class="apiDetail">
<p>Consume input from the request input buffer.</p>
    <dl><dt><b>Description</b>:</dt><dd>This is called by handlers when consuming data from the request input buffer. This call updates the input service pointers and compacts the input buffer if required.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">nbytes</td><td>Number of bytes the handler has consumed from the input buffer.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga762ed53bab0974c82bfa0fdcef22580d"></a>
<div class="api">
  <div class="prototype">
    char *
    websDecode64
(char *str)
  </div>
  <div class="apiDetail">
<p>Decode the string using base-64 encoding.</p>
    <dl><dt><b>Description</b>:</dt><dd>This modifies the original string.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to decode.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The original string. Caller must not free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga3b21883f613ad05e48a9de43714bf67e"></a>
<div class="api">
  <div class="prototype">
    char *
    websDecode64Block
(char *str, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> *len, int flags)
  </div>
  <div class="apiDetail">
<p>Decode a block using base-46 encoding.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to decode. The string must be null terminated.</td>
    <tr><td class="param">len</td><td>Reference to an integer holding the length of the decoded string.</td>
    <tr><td class="param">flags</td><td>Reserved.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The original string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gab121f04477c839b0750fb24db5f25d8b"></a>
<div class="api">
  <div class="prototype">
    void
    websDecodeUrl
(char *decoded, char *input, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)
  </div>
  <div class="apiDetail">
<p>Decode a URL expanding NN encoding.</p>
    <dl><dt><b>Description</b>:</dt><dd>Supports insitu decoding. i.e. Input and output buffers may be the same.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">decoded</td><td>Buffer to hold the decoded URL.</td>
    <tr><td class="param">input</td><td>Input URL or buffer to decode.</td>
    <tr><td class="param">len</td><td>Length of the decoded buffer.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga16df3436fa7bff9179b1d278c24beef5"></a>
<div class="api">
  <div class="prototype">
    int
    websDefineAction
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, void *fun)
  </div>
  <div class="apiDetail">
<p>Define an action callback for use with the action handler.</p>
    <dl><dt><b>Description</b>:</dt><dd>The action handler binds a C function to a URI under &quot;/action&quot;.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">name</td><td>URI path suffix. This suffix is added to &quot;/action&quot; to form the bound URI path.</td>
    <tr><td class="param">fun</td><td>Callback function. The signature is void (*WebsAction)(Webs *wp);.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gabfae07af8717f3e8080cc4738db4ae1e"></a>
<div class="api">
  <div class="prototype">
    int
    websDefineHandler
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="#group___webs_1ga1b14d912d52adc694c3c713ec0a17412" class="ref">WebsHandlerProc</a> match, <a href="#group___webs_1ga1b14d912d52adc694c3c713ec0a17412" class="ref">WebsHandlerProc</a> service, <a href="#group___webs_1ga6b8f7c9a8138c1c585ec1c2b7aa7a954" class="ref">WebsHandlerClose</a> close, int flags)
  </div>
  <div class="apiDetail">
<p>Define a request handler.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">name</td><td>Name of the handler.</td>
    <tr><td class="param">match</td><td>Handler callback match procedure. Invoked to match the request with the handler. The handler should return true to accept the request.</td>
    <tr><td class="param">service</td><td>Handler callback service procedure. Invoked to service each request.</td>
    <tr><td class="param">close</td><td>Handler callback close procedure. Called when GoAhead is shutting down.</td>
    <tr><td class="param">flags</td><td>Set to WEBS_LEGACY_HANDLER to support the legacy handler API calling sequence.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga7f4aa0888bf456eab90a010bcbcdb770"></a>
<div class="api">
  <div class="prototype">
    int
    websDefineJst
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="#group___webs_1ga35aa7f7f128a9d1a4c4f3eeb7849d638" class="ref">WebsJstProc</a> fn)
  </div>
  <div class="apiDetail">
<p>Define a Javscript native function.</p>
    <dl><dt><b>Description</b>:</dt><dd>This routine binds a C function to a Javascript function. When the Javascript function is called, the C function is invoked.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">name</td><td>Javascript function name.</td>
    <tr><td class="param">fn</td><td>C function to invoke.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gac2af58b7a686cb33e44eb010cf755ce1"></a>
<div class="api">
  <div class="prototype">
    void
    websDone
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Complete a request.</p>
    <dl><dt><b>Description</b>:</dt><dd>A handler should call <a class="ref" href="#group___webs_1gac2af58b7a686cb33e44eb010cf755ce1">websDone()</a> to complete the request.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga97f5bcd7b8aa8df838037f9cf2c55267"></a>
<div class="api">
  <div class="prototype">
    char *
    websEncode64
(char *str)
  </div>
  <div class="apiDetail">
<p>Encode a string using base-64 encoding.</p>
    <dl><dt><b>Description</b>:</dt><dd>The string is encoded insitu.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to encode.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The original string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga01aac3c460b2484e8f26f147e993846e"></a>
<div class="api">
  <div class="prototype">
    char *
    websEncode64Block
(char *str, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)
  </div>
  <div class="apiDetail">
<p>Encode a block using base-64 encoding.</p>
    <dl><dt><b>Description</b>:</dt><dd>The string is encoded insitu.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to encode.</td>
    <tr><td class="param">len</td><td>Length of string to encode.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The original string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gac898af1d6d0c6cccb905e6a53479b559"></a>
<div class="api">
  <div class="prototype">
    void
    websError
(<a href="#group___webs" class="ref">Webs</a> *wp, int code, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)
  </div>
  <div class="apiDetail">
<p>Complete a request with an error response.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">code</td><td>HTTP status code.</td>
    <tr><td class="param">fmt</td><td>Message printf style format.</td>
    <tr><td class="param">...</td><td>Format args.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga36a32239715d1f4eedff518aa81542ba"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    websErrorMsg
(int code)
  </div>
  <div class="apiDetail">
<p>Get a message for a HTTP status code.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">code</td><td>HTTP status code.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Http status message. Caller must not free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga22d0cc25b40e3a8039b9c62da85661bd"></a>
<div class="api">
  <div class="prototype">
    char *
    websEscapeHtml
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
  </div>
  <div class="apiDetail">
<p>Escape unsafe characters in a string.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to escape.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An allocated block containing the escaped string. Caller must free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga53edc269c112daec8f25ce42bc91421c"></a>
<div class="api">
  <div class="prototype">
    char *
    websEscapeUri
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
  </div>
  <div class="apiDetail">
<p>Escape unsafe URI characters in a string using CC substitution.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to escape.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An allocated block containing the escaped string. Caller must free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gaf24cee2f9e39e20e09e73067b8b5b072"></a>
<div class="api">
  <div class="prototype">
    void
    websFileOpen
(void )
  </div>
  <div class="apiDetail">
<p>Open and initialize the file handler.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga6525ac98afd32c69fd0a7985c0b87f5f"></a>
<div class="api">
  <div class="prototype">
    int
    websFlush
(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> block)
  </div>
  <div class="apiDetail">
<p>Flush buffered transmit data and compact the transmit buffer to make room for more data.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call initiates sending buffered data. If blocking mode is selected via the block parameter, this call will wait until all the data has been sent to the O/S for transmission to the client. If block is false, the flush will be initiated and the call will return immediately without blocking.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">block</td><td>Set to true to wait for all data to be written to the socket. Set to false to write whatever the socket can absorb without blocking.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>-1 for I/O errors. Return zero if there is more data remaining in the buffer. Return 1 if the contents of the transmit buffer are fully written and the buffer is now empty.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga34a9c871eaf4cba49ff81174318af979"></a>
<div class="api">
  <div class="prototype">
    void
    websFree
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Free the webs request object.</p>
    <dl><dt><b>Description</b>:</dt><dd>Callers should call websDone to complete requests prior to invoking websFree.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga54bd8e9073aca8fe5ac527e0b26ae738"></a>
<div class="api">
  <div class="prototype">
    void
    websFreeUpload
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Free file upload data structures.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga3d2d9787c3fd3b4338ae0a6995fbb338"></a>
<div class="api">
  <div class="prototype">
    void
    websFsClose
(void )
  </div>
  <div class="apiDetail">
<p>Close the file system module.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga0014f224e979be944998d31c4faad46f"></a>
<div class="api">
  <div class="prototype">
    int
    websFsOpen
(void )
  </div>
  <div class="apiDetail">
<p>Open the file system module.</p>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga4ac722a8a552f9740ad97de6f23891a4"></a>
<div class="api">
  <div class="prototype">
    int
    websGetBackground
(void )
  </div>
  <div class="apiDetail">
<p>Get the background execution flag.</p>
    <dl><dt><b>Description</b>:</dt><dd>If GoAhead is invoked with <ndash/>background, it will run as a daemon in the background.</dd></dl>
    <dl><dt>Returns:</dt><dd>True if GoAhead is running in the background.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga1dd8b54372cecf50a6773639ca10de8b"></a>
<div class="api">
  <div class="prototype">
    char *
    websGetCgiCommName
(void )
  </div>
  <div class="apiDetail">
<p>Get a unique temporary filename for CGI communications.</p>
    <dl><dt>Returns:</dt><dd>Allocated filename string. Caller must free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga0c1129a2e6d2ab25749ce6434cf06917"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    websGetCookie
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Get the request cookie if supplied.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Cookie string if defined, otherwise null. Caller must not free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga8d082538c22928173eaf231eece3c2bb"></a>
<div class="api">
  <div class="prototype">
    char *
    websGetDateString
(<a href="#struct_webs_file_info" class="ref">WebsFileInfo</a> *sbuf)
  </div>
  <div class="apiDetail">
<p>Get a date as a string.</p>
    <dl><dt><b>Description</b>:</dt><dd>If sbuf is supplied, it is used to calculate the date. Otherwise, the current time is used.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sbuf</td><td>File info object.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An allocated date string. Caller should free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga9cbfca3c673e58c64325460d6e0c5e74"></a>
<div class="api">
  <div class="prototype">
    int
    websGetDebug
(void )
  </div>
  <div class="apiDetail">
<p>Get the debug flag.</p>
    <dl><dt><b>Description</b>:</dt><dd>If GoAhead is invoked with <ndash/>debugger, the debug flag will be set to true.</dd></dl>
    <dl><dt>Returns:</dt><dd>True if GoAhead is running in debug mode.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga8ee6d14425afb8eefebf5556ee18c8a2"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    websGetDir
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Get the base file directory for a request.</p>
    <dl><dt><b>Description</b>:</dt><dd>Returns the request route directory if defined, otherwise returns the documents directory.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Path name string. Caller should not free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga2996ca4f6fd53f9b968930add8cf037c"></a>
<div class="api">
  <div class="prototype">
    char *
    websGetDocuments
(void )
  </div>
  <div class="apiDetail">
<p>Get the GoAhead base documents directory.</p>
    <dl><dt><b>Description</b>:</dt><dd>The documents directory is defined at build time and may be overridden by the GoAhead command line.</dd></dl>
    <dl><dt>Returns:</dt><dd>Path string for the documents directory.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga2666ed7d6a56c3014d5ceb076cff0567"></a>
<div class="api">
  <div class="prototype">
    int
    websGetEof
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Get the request EOF status.</p>
    <dl><dt><b>Description</b>:</dt><dd>The request EOF status is set to true when all the request body (POST|PUT) data has been received.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if all the request body data has been received.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gae8b669809d9cba59ef7b77ec5b754dc0"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    websGetExt
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Get the request URI extension.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The URI filename extension component. Caller should not free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga1d34d561f81d6f9ad69244a06d6e38cf"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    websGetFilename
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Get the request filename.</p>
    <dl><dt><b>Description</b>:</dt><dd>The URI is mapped to a filename by decoding and prepending with the request directory.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Filename string. Caller should not free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga3d13a47ed8ee3f9a3126f51ae1b9d620"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    websGetHost
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Get the request host.</p>
    <dl><dt><b>Description</b>:</dt><dd>The request host is set to the Host HTTP header value if it is present. Otherwise it is set to the request URI hostname.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Host string. Caller should not free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gabfdcb79258d04eaa6912393d155eab6c"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    websGetIfaddr
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Get the request interface address.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Network interface string. Caller should not free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga37e0f4bfb4dc0bfaf554863df437ece6"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    websGetIndex
(void )
  </div>
  <div class="apiDetail">
<p>Get the default index document name.</p>
    <dl><dt><b>Description</b>:</dt><dd>The default index is &quot;index.html&quot; and can be updated via websSetIndex.</dd></dl>
    <dl><dt>Returns:</dt><dd>Index name string. Caller should not free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga2746a02538e42a71d4ef272a9971f986"></a>
<div class="api">
  <div class="prototype">
    int
    websGetLogLevel
(void )
  </div>
  <div class="apiDetail">
<p>Get the current trace log level.</p>
    <dl><dt>Returns:</dt><dd>Number between 0 and 9.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga899fcb60a5afe215e7c56bc1f3c00961"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    websGetMethod
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Get the request method.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>HTTP method string. Caller should not free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gaf36ce4de6a4772ed13ef1f6073d9cb7a"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    websGetPassword
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Get the request password.</p>
    <dl><dt><b>Description</b>:</dt><dd>The request password may be encoded depending on the authentication scheme. See wp-&gt;encoded to test if it is encoded.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Password string. Caller should not free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga4c8b947cea7d8077f51d023aec7cd603"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    websGetPath
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Get the request path.</p>
    <dl><dt><b>Description</b>:</dt><dd>The URI path component excludes the http protocol, hostname, port, reference and query components. It always beings with &quot;/&quot;.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Request path string. Caller should not free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gaee772cdbaee60ec39567c47e9a83c2c6"></a>
<div class="api">
  <div class="prototype">
    int
    websGetPort
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Get the request TCP/IP port.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>TCP/IP Port integer.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gaa18fd6e345dee2e99c47f02471978177"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    websGetProtocol
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Get the request HTTP protocol.</p>
    <dl><dt><b>Description</b>:</dt><dd>This will be set to either &quot;http&quot; or &quot;https&quot;.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Protocol string. Caller should not free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gafae1ecad7c3b1a2bfe452cbab8025ab1"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    websGetQuery
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Get the request query component.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Request query string. Caller should not free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga4968ce8b1e8a6fe330b1bf78bb77e278"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    websGetServer
(void )
  </div>
  <div class="apiDetail">
<p>Get the server host name.</p>
    <dl><dt>Returns:</dt><dd>Host name string. Caller should not free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga999c5adc0501b4c00414caa8baaf6230"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    websGetServerAddress
(void )
  </div>
  <div class="apiDetail">
<p>Get the server IP address.</p>
    <dl><dt>Returns:</dt><dd>Server IP address string. Caller should not free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gab976a367d9cecfef956869e053328862"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    websGetServerAddressUrl
(void )
  </div>
  <div class="apiDetail">
<p>Get the server IP address with port number.</p>
    <dl><dt>Returns:</dt><dd>Server IP:PORT address string. Caller should not free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gaf852b66707400fa0cf172a72731893ce"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    websGetServerUrl
(void )
  </div>
  <div class="apiDetail">
<p>Get the server host name with port number.</p>
    <dl><dt>Returns:</dt><dd>Host name string with port number. Caller should not free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga972f7fc60c236c0e4e6ea7e325096b73"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    websGetUrl
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Get the request URI.</p>
    <dl><dt><b>Description</b>:</dt><dd>This returns the request URI. This may be modified if the request is rewritten via websRewrite.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>URI string. Caller should not free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga78e094c02b19ce4de8d7c8b62f05be18"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    websGetUserAgent
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Get the client User-Agent HTTP header.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>User-Agent string. Caller should not free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga46696bd6220b11d9e7edf516cd17e578"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    websGetUsername
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Get the request username.</p>
    <dl><dt><b>Description</b>:</dt><dd>If the request is authenticated, this call returns the username supplied during authentication.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Username string if defined, otherwise null. Caller should not free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga4cd0530612a92dde9042c030c369e7d8"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    websGetVar
(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *defaultValue)
  </div>
  <div class="apiDetail">
<p>Get a request variable.</p>
    <dl><dt><b>Description</b>:</dt><dd>Request variables are defined for HTTP headers of the form HTTP_*. Some request handlers also define their own variables. For example: CGI environment variables.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">name</td><td>Variable name.</td>
    <tr><td class="param">defaultValue</td><td>Default value to return if the variable is not defined.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Variable value string. Caller should not free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga75e53757d82543b1b27797967c0aefb6"></a>
<div class="api">
  <div class="prototype">
    int
    websJstOpen
(void )
  </div>
  <div class="apiDetail">
<p>Open the Javascript module.</p>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga88501f83c58a6ea9dc8fd14974db9130"></a>
<div class="api">
  <div class="prototype">
    int
    websJstWrite
(int jid, <a href="#group___webs" class="ref">Webs</a> *wp, int argc, char **argv)
  </div>
  <div class="apiDetail">
<p>Write data to the response.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">jid</td><td>Javascript ID handle.</td>
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">argc</td><td>Count of arguments.</td>
    <tr><td class="param">argv</td><td>Array arguments.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gaa883a6d5dfe21e9ae5fd6f1bae2b72c9"></a>
<div class="api">
  <div class="prototype">
    int
    websListen
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *endpoint)
  </div>
  <div class="apiDetail">
<p>Listen on a TCP/IP address endpoint.</p>
    <dl><dt><b>Description</b>:</dt><dd>The URI is mapped to a filename by decoding and prepending with the request directory. For IPv6 addresses, use the format: [aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh:iiii]:port.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">endpoint</td><td>IPv4 or IPv6 address on which to listen.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Positive integer holding a Socket ID handle if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga24336820ff761ed13dd23341a9b86ed5"></a>
<div class="api">
  <div class="prototype">
    char *
    websMD5
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
  </div>
  <div class="apiDetail">
<p>Get an MD5 digest of a string.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to analyze.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Allocated MD5 checksum. Caller should free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga06c3e0f9f7351e1127d21ff3713df104"></a>
<div class="api">
  <div class="prototype">
    char *
    websMD5Block
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> length, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *prefix)
  </div>
  <div class="apiDetail">
<p>Get an MD5 digest of a block and optionally prepend a prefix.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Block to analyze.</td>
    <tr><td class="param">length</td><td>Length of block.</td>
    <tr><td class="param">prefix</td><td>Optional prefix to prepend to the MD5 sum.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Allocated MD5 checksum. Caller should free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga8f14fc6ef969671a37ed65acc154a57f"></a>
<div class="api">
  <div class="prototype">
    char *
    websNormalizeUriPath
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
  </div>
  <div class="apiDetail">
<p>Normalize a URI path.</p>
    <dl><dt><b>Description</b>:</dt><dd>This removes &quot;./&quot;, &quot;../&quot; and redundant separators.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>URI path to normalize.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An allocated normalized URI path. Caller must free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga3b5c4de81f247a9faf225c636ec8c79f"></a>
<div class="api">
  <div class="prototype">
    void
    websNoteRequestActivity
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Take not of the request activity and mark the time.</p>
    <dl><dt><b>Description</b>:</dt><dd>This is used to defer the request timeout whenever there is request I/O activity.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga1cedecd14d83cdd8dcbffceb8b51791c"></a>
<div class="api">
  <div class="prototype">
    int
    websOpen
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *documents, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *routes)
  </div>
  <div class="apiDetail">
<p>Open the web server.</p>
    <dl><dt><b>Description</b>:</dt><dd>This initializes the web server and defines the documents directory.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">documents</td><td>Optional web documents directory. If set to null, the build time ME_GOAHEAD_DOCUMENTS value is used for the documents directory.</td>
    <tr><td class="param">routes</td><td>Optional filename for a route configuration file to load. Additional route or authentication configuration files can be loaded via websLoad.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga3e3edc47c5f177466de9c3eabe664b88"></a>
<div class="api">
  <div class="prototype">
    int
    websOpenFile
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, int flags, int mode)
  </div>
  <div class="apiDetail">
<p>Open the web page document for the current request.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Filename path to open.</td>
    <tr><td class="param">flags</td><td>File open flags.</td>
    <tr><td class="param">mode</td><td>Permissions mask.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Positive file handle if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga690dbbada9274dd35ce9d2a96d981e07"></a>
<div class="api">
  <div class="prototype">
    int
    websOptionsOpen
(void )
  </div>
  <div class="apiDetail">
<p>Open the options handler.</p>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gad56c750456cbcb6bde8f6e28d4ba3989"></a>
<div class="api">
  <div class="prototype">
    void
    websOsClose
(void )
  </div>
  <div class="apiDetail">
<p>Close the O/S dependent code.</p>
    <dl><dt><b>Description</b>:</dt><dd>Called from websClose.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gada39f22333835280a7be57bd1770aef1"></a>
<div class="api">
  <div class="prototype">
    int
    websOsOpen
(void )
  </div>
  <div class="apiDetail">
<p>Open the O/S dependent code.</p>
    <dl><dt><b>Description</b>:</dt><dd>Called from websOpen.</dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga42ac8fd2d43cd62e36de672897476033"></a>
<div class="api">
  <div class="prototype">
    void
    websPageClose
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Close the document page.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gae3a5d48960ff548b64372bf79d151801"></a>
<div class="api">
  <div class="prototype">
    int
    websPageIsDirectory
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Test if the document page for the request corresponds to a directory.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the filename is a directory.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga550a444cd6c8991eef437ece0cff386a"></a>
<div class="api">
  <div class="prototype">
    int
    websPageOpen
(<a href="#group___webs" class="ref">Webs</a> *wp, int mode, int perms)
  </div>
  <div class="apiDetail">
<p>Open a web page document for a request.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">mode</td><td>File open mode. Select from O_RDONLY and O_BINARY. Rom files systems ignore this argument.</td>
    <tr><td class="param">perms</td><td>Ignored.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>File handle if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga412045a224b12fad35f3ccb0eba21309"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    websPageReadData
(<a href="#group___webs" class="ref">Webs</a> *wp, char *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)
  </div>
  <div class="apiDetail">
<p>Read data from the request page document.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">buf</td><td>Buffer for the read data.</td>
    <tr><td class="param">size</td><td>Size of buf.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Count of bytes read if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gade99dac2cc10314deb754833298fc3af"></a>
<div class="api">
  <div class="prototype">
    void
    websPageSeek
(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="#goahead_8h_1a7bac74916a564105339bcd5a9323c366" class="ref">Offset</a> offset, int origin)
  </div>
  <div class="apiDetail">
<p>Seek to a position in the request page document.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">offset</td><td>Offset of location in the file to seek to. This is relative to the specified origin.</td>
    <tr><td class="param">origin</td><td>Set to SEEK_CUR, SEEK_SET or SEEK_END to position relative to the current position, beginning or end of the document.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gafa581d664b5cc3eacc073d1a5d113d7a"></a>
<div class="api">
  <div class="prototype">
    int
    websPageStat
(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="#struct_webs_file_info" class="ref">WebsFileInfo</a> *sbuf)
  </div>
  <div class="apiDetail">
<p>Get file status for the current request document.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">sbuf</td><td>File information structure to modify with file status.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gac893e2749beee259505e673c4e551f04"></a>
<div class="api">
  <div class="prototype">
    int
    websParseDateTime
(<a href="#goahead_8h_1acdd9aaf80c8e9b08b3cf94200c91a6ae" class="ref">WebsTime</a> *time, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *date, struct tm *defaults)
  </div>
  <div class="apiDetail">
<p>Parse a date/time string.</p>
    <dl><dt><b>Description</b>:</dt><dd>Try to intelligently parse a date. This is a tolerant parser. It is not validating and will do its best to parse any possible date string. Supports the following date/time formats: <br/><br/>
 ISO dates: 2009-05-21t16:06:05.000z <br/><br/>
 Date: 07/28/2014, 07/28/08, Jan/28/2014, Jaunuary-28-2014, 28-jan-2014. <br/><br/>
 Support date order: dd/mm/yy, mm/dd/yy and yyyy/mm/dd <br/><br/>
 Support separators &quot;/&quot;, &quot;.&quot;, &quot;-&quot; <br/><br/>
 Timezones: GMT|UTC[+-]NN[:]NN <br/><br/>
 Time: 10:52[:23] <br/><br/></dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">time</td><td>Reference to a.</td>
    <tr><td class="param">date</td><td>Date/time string to parse.</td>
    <tr><td class="param">defaults</td><td>Optionally supply missing components for the date/time. Set to NULL if not used.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Evolving.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga0853e59f6f1dba6c94c8d3d659106e7f"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    websProcessCgiData
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Process CGI request body data.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if processing the request can proceed.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gabf36424ddd2ef63ac20fc1419debc90e"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    websProcessUploadData
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Process upload data for form, multipart mime file upload.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if processing the request can proceed.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gaf8cbf1876923de6cacc9654cb89692dd"></a>
<div class="api">
  <div class="prototype">
    void
    websPump
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Pump the state machine.</p>
    <dl><dt><b>Description</b>:</dt><dd>This routine will advance the connection state machine in response to events.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga648cc4a4536a44aefcffaa091b3ea37f"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    websReadFile
(int fd, char *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)
  </div>
  <div class="apiDetail">
<p>Read data from an open file.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">fd</td><td>Open file handle returned by websOpenFile.</td>
    <tr><td class="param">buf</td><td>Buffer for the read data.</td>
    <tr><td class="param">size</td><td>Size of buf.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Count of bytes read if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gab71f9da6c9f523bd6486fa9e2065cb5b"></a>
<div class="api">
  <div class="prototype">
    char *
    websReadWholeFile
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
  </div>
  <div class="apiDetail">
<p>Read all the data from a file.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>File path to read from.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An allocated buffer containing the file data with an appended null. Caller must free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga71919fc188e9b1f7130891b22181abd4"></a>
<div class="api">
  <div class="prototype">
    void
    websRedirect
(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *url)
  </div>
  <div class="apiDetail">
<p>Redirect the client to a new URL.</p>
    <dl><dt><b>Description</b>:</dt><dd>This creates a response to the client with a Location header directing the client to a new location. The response uses a 302 HTTP status code.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">url</td><td>URL to direct the client to.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga2071f8d94ddff6c2143caeca98e4b28d"></a>
<div class="api">
  <div class="prototype">
    int
    websRedirectByStatus
(<a href="#group___webs" class="ref">Webs</a> *wp, int status)
  </div>
  <div class="apiDetail">
<p>Redirect the client to a new URI.</p>
    <dl><dt><b>Description</b>:</dt><dd>The routing configuration file can define redirection routes for various HTTP status codes. This routine will utilize the appropriate route redirection based on the request route and specified status code.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">status</td><td>HTTP status code to use in selecting the route redirection.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gab0e25f7d5e2ab92116e94a3d2f0e6712"></a>
<div class="api">
  <div class="prototype">
    void
    websResponse
(<a href="#group___webs" class="ref">Webs</a> *wp, int status, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *msg)
  </div>
  <div class="apiDetail">
<p>Create and send a request response.</p>
    <dl><dt><b>Description</b>:</dt><dd>This creates a response for the current request using the specified HTTP status code and the supplied message.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">status</td><td>HTTP status code.</td>
    <tr><td class="param">msg</td><td>Response message body.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga5a766509244081e0f76bc70479b2a912"></a>
<div class="api">
  <div class="prototype">
    int
    websRewriteRequest
(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *url)
  </div>
  <div class="apiDetail">
<p>Rewrite a request.</p>
    <dl><dt><b>Description</b>:</dt><dd>Handlers may choose to not process a request but rather rewrite requests and then reroute.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">url</td><td>New request URL.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gaa36f628a3e14fe08420597095f0f74c2"></a>
<div class="api">
  <div class="prototype">
    void
    websRuntimeClose
(void )
  </div>
  <div class="apiDetail">
<p>Close the runtime code.</p>
    <dl><dt><b>Description</b>:</dt><dd>Called from websClose.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga4d8e96f6b4a072ca8cadda04912a669e"></a>
<div class="api">
  <div class="prototype">
    int
    websRuntimeOpen
(void )
  </div>
  <div class="apiDetail">
<p>Open the runtime code.</p>
    <dl><dt><b>Description</b>:</dt><dd>Called from websOpen.</dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gaca0e8d193f5ad1592e7945ac95d9d96e"></a>
<div class="api">
  <div class="prototype">
    <a href="#goahead_8h_1a7bac74916a564105339bcd5a9323c366" class="ref">Offset</a>
    websSeekFile
(int fd, <a href="#goahead_8h_1a7bac74916a564105339bcd5a9323c366" class="ref">Offset</a> offset, int origin)
  </div>
  <div class="apiDetail">
<p>Seek to a position in the current request page document.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">fd</td><td>Open file handle returned by websOpenFile.</td>
    <tr><td class="param">offset</td><td>Location in the file to seek to.</td>
    <tr><td class="param">origin</td><td>Set to SEEK_CUR, SEEK_SET or SEEK_END to position relative to the current position, beginning or end of the document.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gae1e0fc3c37a3050a6da804a42637b32e"></a>
<div class="api">
  <div class="prototype">
    int
    websServer
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *endpoint, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *documents)
  </div>
  <div class="apiDetail">
<p>One line embedding API.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call will also open auth.txt and route.txt for authentication and routing configuration.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">endpoint</td><td>IP:PORT address on which to listen.</td>
    <tr><td class="param">documents</td><td>Directory containing web documents to serve.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga81d8a2cfbe5360e1a46011172470368a"></a>
<div class="api">
  <div class="prototype">
    void
    websServiceEvents
(int *finished)
  </div>
  <div class="apiDetail">
<p>Service I/O events until finished.</p>
    <dl><dt><b>Description</b>:</dt><dd>This will wait for socket events and service those until *finished is set to true.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">finished</td><td>Integer location to test. If set to true, then exit. Note: setting finished will not automatically wake up the service routine.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gaed3bf51e30277fe1b56379bb6a1b6699"></a>
<div class="api">
  <div class="prototype">
    void
    websSetBackground
(int on)
  </div>
  <div class="apiDetail">
<p>Set the background processing flag.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">on</td><td>Value to set the background flag to.</td>
    </table></dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga628ad13f465a4c67339e2b53540ad01a"></a>
<div class="api">
  <div class="prototype">
    void
    websSetCookie
(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *domain, int lifespan, int flags)
  </div>
  <div class="apiDetail">
<p>Define a cookie to include in the response.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">name</td><td>Cookie name.</td>
    <tr><td class="param">value</td><td>Cookie value.</td>
    <tr><td class="param">path</td><td>URI path prefix applicable for this cookie.</td>
    <tr><td class="param">domain</td><td>Domain applicable for this cookie.</td>
    <tr><td class="param">lifespan</td><td>Cookie lifespan in seconds.</td>
    <tr><td class="param">flags</td><td>Set to WEBS_COOKIE_SECURE for https only. Set to WEBS_COOKIE_HTTP for http only. Otherwise the cookie applies to both http and https requests. Or in WEBS_COOKIE_SAME_LAX for SameSite=Lax and WEBS_COOKIE_SAME_STRICT for SameSite=Strict.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gae3b839fa0c223b457f109c61c177da96"></a>
<div class="api">
  <div class="prototype">
    void
    websSetDebug
(int on)
  </div>
  <div class="apiDetail">
<p>Set the debug processing flag.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">on</td><td>Value to set the debug flag to.</td>
    </table></dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gaf0802eca30adb2cc9d2b7d2ccc2badc6"></a>
<div class="api">
  <div class="prototype">
    void
    websSetDocuments
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *dir)
  </div>
  <div class="apiDetail">
<p>Set the web documents directory.</p>
    <dl><dt><b>Description</b>:</dt><dd>The web documents directory is used when resolving request URIs into filenames.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">dir</td><td>Directory path to use.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga01f49a8761bd89203fa493a79a821e56"></a>
<div class="api">
  <div class="prototype">
    void
    websSetEnv
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Create the CGI environment variables for the current request.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gacba78b1a19ef4ddade76807333243d5c"></a>
<div class="api">
  <div class="prototype">
    void
    websSetFormVars
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Create request variables for query and POST body data.</p>
    <dl><dt><b>Description</b>:</dt><dd>This creates request variables if the request is a POST form (has a Content-Type of application/x-www-form-urlencoded). The POST body data is consumed from the input buffer.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga826854eb79f23630f7f7905ccf862976"></a>
<div class="api">
  <div class="prototype">
    void
    websSetHost
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *host)
  </div>
  <div class="apiDetail">
<p>Define the host name for the server.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">host</td><td>String host name.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga346178ebf1361d67acab6a62ff15adc2"></a>
<div class="api">
  <div class="prototype">
    void
    websSetIndex
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *filename)
  </div>
  <div class="apiDetail">
<p>Create and send a request response.</p>
    <dl><dt><b>Description</b>:</dt><dd>This creates a response for the current request using the specified HTTP status code and the supplied message.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">filename</td><td>Web document name to use as the index. This should not contain any directory components.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga7528ade178ede9cd6fe6abe011869dc1"></a>
<div class="api">
  <div class="prototype">
    void
    websSetIpAddr
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ipaddr)
  </div>
  <div class="apiDetail">
<p>Define the host IP address.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ipaddr</td><td>Host IP address.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga46d153b401bb7fc47ae5b17203541644"></a>
<div class="api">
  <div class="prototype">
    void
    websSetLogLevel
(int level)
  </div>
  <div class="apiDetail">
<p>Set the current trace log level.</p>
    <dl><dt>Returns:</dt><dd>Number between 0 and 9.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Prototype.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga9b7ae14718f40340d9621529f4587548"></a>
<div class="api">
  <div class="prototype">
    void
    websSetQueryVars
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Create request variables for query string data.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gaef03eccfb6f0d42b34f1a7a90bac62b6"></a>
<div class="api">
  <div class="prototype">
    void
    websSetStatus
(<a href="#group___webs" class="ref">Webs</a> *wp, int status)
  </div>
  <div class="apiDetail">
<p>Set the response HTTP status code.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">status</td><td>HTTP status code.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga999bb54215bbc7d71c7d6e828fcf49c8"></a>
<div class="api">
  <div class="prototype">
    void
    websSetTxLength
(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> length)
  </div>
  <div class="apiDetail">
<p>Set the response body content length.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">length</td><td>Length value to use.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga7bc119287019bd62d1db463ea72505b5"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_webs_key" class="ref">WebsKey</a> *
    websSetVar
(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value)
  </div>
  <div class="apiDetail">
<p>Set a request variable to a string value.</p>
    <dl><dt><b>Description</b>:</dt><dd>Request variables are defined for HTTP headers of the form HTTP_*. Some request handlers also define their own variables. For example: CGI environment variables.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">name</td><td>Variable name to set.</td>
    <tr><td class="param">value</td><td>Value to set.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The allocated WebsKey.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Evolving.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gae224484206da359d0c9e0a11469d4b4f"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_webs_key" class="ref">WebsKey</a> *
    websSetVarFmt
(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)
  </div>
  <div class="apiDetail">
<p>Set a request variable to a formatted string value.</p>
    <dl><dt><b>Description</b>:</dt><dd>Request variables are defined for HTTP headers of the form HTTP_*. Some request handlers also define their own variables. For example: CGI environment variables.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">name</td><td>Variable name to set.</td>
    <tr><td class="param">fmt</td><td>Value format string.</td>
    <tr><td class="param">...</td><td>Args to format.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The allocated WebsKey.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Evolving.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga040b642a888cc259456bacfec4227217"></a>
<div class="api">
  <div class="prototype">
    int
    websStatFile
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="#struct_webs_file_info" class="ref">WebsFileInfo</a> *sbuf)
  </div>
  <div class="apiDetail">
<p>Get file status for a file.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Filename path.</td>
    <tr><td class="param">sbuf</td><td>File information structure to modify with file status.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga7c1b3749d9f6644db2c7a60d44c453db"></a>
<div class="api">
  <div class="prototype">
    char *
    websTempFile
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *dir, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *prefix)
  </div>
  <div class="apiDetail">
<p>Create a temporary filename This does not guarantee the filename is unique or that it is not already in use by another application.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">dir</td><td>Directory to locate the temp file. Defaults to the O/S default temporary directory (usually /tmp).</td>
    <tr><td class="param">prefix</td><td>Filename prefix.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>An allocated filename string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gab42afeb8b16720903e8289fcb9c072ba"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    websTestVar
(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)
  </div>
  <div class="apiDetail">
<p>Test if a request variable is defined.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">name</td><td>Variable name.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the variable is defined.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gafc3db65ebb5f3a86ec0e3ccde56c1f31"></a>
<div class="api">
  <div class="prototype">
    void
    websTimeClose
(void )
  </div>
  <div class="apiDetail">
<p>Close the date/time parsing module.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Evolving.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga4a94586b4fdeb3c91b1555c3d70151a0"></a>
<div class="api">
  <div class="prototype">
    int
    websTimeOpen
(void )
  </div>
  <div class="apiDetail">
<p>Open the date/time parsing module.</p>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Evolving.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga8c080d18fb0f34cb68759bce48eac7d9"></a>
<div class="api">
  <div class="prototype">
    int
    websUrlParse
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *url, char **buf, char **protocol, char **host, char **port, char **path, char **ext, char **reference, char **query)
  </div>
  <div class="apiDetail">
<p>Parse a URL into its components.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">url</td><td>URL to parse.</td>
    <tr><td class="param">buf</td><td>Buffer to hold storage for various parsed components. Caller must free. NOTE: the parsed components may point to locations in this buffer.</td>
    <tr><td class="param">protocol</td><td>Parsed URL protocol component.</td>
    <tr><td class="param">host</td><td>Parsed hostname.</td>
    <tr><td class="param">port</td><td>Parsed URL port.</td>
    <tr><td class="param">path</td><td>Parsed URL path component.</td>
    <tr><td class="param">ext</td><td>Parsed URL extension.</td>
    <tr><td class="param">reference</td><td>Parsed URL reference portion (#reference).</td>
    <tr><td class="param">query</td><td>Parsed URL query component.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Evolving.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gaebff2db9e8b7a70579082cf92593bcfe"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    websValid
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Test if a webs object is valid.</p>
    <dl><dt><b>Description</b>:</dt><dd>After calling websDone, the websFree routine will have been called and the memory for the webs object will be released. Call websValid to test a Webs object for validity.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the webs object is still valid and the request has not been completed.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gaf2f303661dab21b74f2ed7c88d741486"></a>
<div class="api">
  <div class="prototype">
    char *
    websValidateUriPath
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *uri)
  </div>
  <div class="apiDetail">
<p>Validate a URI path as expected in a HTTP request line.</p>
    <dl><dt><b>Description</b>:</dt><dd>This expects a URI beginning with &quot;/&quot; and containing only valid URI characters. The URI is decoded, and normalized removing &quot;../&quot; and &quot;.&quot; segments. The URI must begin with a &quot;/&quot; both before and after decoding and normalization.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">uri</td><td>URI to validate.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A validated, normalized URI path. Caller must free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gafd15ff2fac3a34650837fec69124b2a2"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    websValidUriChars
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *uri)
  </div>
  <div class="apiDetail">
<p>Test if a URI is using only valid characters Note this does not test if the URI is fully legal.</p>
Some components of the URI have restricted character sets that this routine does not test. This tests if the URI has only characters valid to use in a URI before decoding. i.e. It will permit NN encodings. The set of valid characters is: &quot;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~:/?#[]@!$&amp;&apos;()*+,;=%&quot;
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">uri</td><td>Uri to test.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the URI string is comprised of legal URI characters.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Evolving.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gac41407ff97f138db72108cb142258f5e"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    websWrite
(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)
  </div>
  <div class="apiDetail">
<p>Write data to the response.</p>
    <dl><dt><b>Description</b>:</dt><dd>The data is buffered and will be sent to the client when the buffer is full or websFlush is called.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">fmt</td><td>Printf style format string.</td>
    <tr><td class="param">...</td><td>Arguments to the format string.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Count of bytes written.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga9b63519c49d00fae1e06b2c918f970f7"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    websWriteBlock
(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)
  </div>
  <div class="apiDetail">
<p>Write a block of data to the response.</p>
    <dl><dt><b>Description</b>:</dt><dd>The data is buffered and will be sent to the client when the buffer is full or websFlush is called. This routine will never return &quot;short&quot;, it will always write all the data unless there are errors.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">buf</td><td>Buffer of data to write.</td>
    <tr><td class="param">size</td><td>Length of buf.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Count of bytes written or -1. This will always equal size if there are no errors.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga7b3fddd74796c79f7e41e8bd9ce107a4"></a>
<div class="api">
  <div class="prototype">
    void
    websWriteEndHeaders
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Signify the end of the response headers.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call concludes the response headers and writes a blank line to the response.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1gadd0a77daf2fd10766c587c179b09081e"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    websWriteFile
(int fd, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)
  </div>
  <div class="apiDetail">
<p>Write data to the open file.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">fd</td><td>Open file handle returned by websOpenFile.</td>
    <tr><td class="param">buf</td><td>Buffer for the read data.</td>
    <tr><td class="param">size</td><td>Size of buf.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Count of bytes read if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga34f4159f41e89e67c22a8767d6cd98bb"></a>
<div class="api">
  <div class="prototype">
    int
    websWriteHeader
(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)
  </div>
  <div class="apiDetail">
<p>Write a response header.</p>
    <dl><dt><b>Description</b>:</dt><dd>This routine writes a response header. It should be invoked after calling websWriteHeaders to write the standard headers and before websWriteEndHeaders. This routine differs from websWrite in that it traces header values to the log.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">key</td><td>Header key value.</td>
    <tr><td class="param">fmt</td><td>Header value format string.</td>
    <tr><td class="param">...</td><td>Arguments to the format string.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga174c1184ac25621b34337fe47e3be7d6"></a>
<div class="api">
  <div class="prototype">
    void
    websWriteHeaders
(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> contentLength, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *redirect)
  </div>
  <div class="apiDetail">
<p>Write a set of standard response headers.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">contentLength</td><td>Value for the Content-Length header which describes the length of the response body.</td>
    <tr><td class="param">redirect</td><td>Value for the Location header which redirects the client to a new URL.</td>
    </table></dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_1gaef03eccfb6f0d42b34f1a7a90bac62b6" class="ref">websSetStatus</a></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="group___webs_1ga8712767b916c5e7a281760ee5d0cbb12"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    websWriteSocket
(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)
  </div>
  <div class="apiDetail">
<p>Write a block of data to the network.</p>
    <dl><dt><b>Description</b>:</dt><dd>This bypassed output buffering and is the lowest level write.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">buf</td><td>Buffer of data to write.</td>
    <tr><td class="param">size</td><td>Length of buf.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Count of bytes written. May be less than len if the socket is in non-blocking mode. Returns -1 for errors and if the socket cannot absorb any more data. If the transport is saturated, will return a negative error and errno will be set to EAGAIN or EWOULDBLOCK.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<h1>WebsAuth</h1>
<a name="group___webs_auth"></a>
<div class="api">
  <div class="prototype">WebsAuth</div>
  <div class="apiDetail">
<p>GoAhead Authentication.</p>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
    </table></dd></dl>
  </div>
</div>
<a name="group___webs_auth_1ga637ac17c1c1d24cafa5589b00e4ef82b"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_webs_role" class="ref">WebsRole</a> *
    websAddRole
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *role, <a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="ref">WebsHash</a> abilities)
  </div>
  <div class="apiDetail">
<p>Add a role.</p>
    <dl><dt><b>Description</b>:</dt><dd>The role is added to the list of roles.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">role</td><td>Role name.</td>
    <tr><td class="param">abilities</td><td>Hash of abilities for the role.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The allocated role.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_auth_1ga9aa0a184957878bff4eeaddc8774c96a"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_webs_user" class="ref">WebsUser</a> *
    websAddUser
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *username, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *password, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *roles)
  </div>
  <div class="apiDetail">
<p>Add a user.</p>
    <dl><dt><b>Description</b>:</dt><dd>The user is added to the list of users.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">username</td><td>User name.</td>
    <tr><td class="param">password</td><td>User password (encrypted).</td>
    <tr><td class="param">roles</td><td>Space separated list of roles. This may also contain abilities.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>User object.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_auth_1ga2e7099150ce40f126e53901b37055164"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    websAuthenticate
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Authenticate a user.</p>
    <dl><dt><b>Description</b>:</dt><dd>The user is authenticated if required by the selected request route.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the route does not require authentication or the user is authenticated successfully.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_auth_1ga4b9213d33c030e357c81a97765a83ab3"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    websCan
(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="ref">WebsHash</a> ability)
  </div>
  <div class="apiDetail">
<p>Test if a user possesses the required ability.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">ability</td><td>Set of required abilities.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the user has the required ability.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_auth_1gafd247c60a4a156f514fae54aba5c95af"></a>
<div class="api">
  <div class="prototype">
    void
    websCloseAuth
(void )
  </div>
  <div class="apiDetail">
<p>Close the authentication module.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_auth_1ga4d6532cddbf3407711d240f6d2591bc9"></a>
<div class="api">
  <div class="prototype">
    void
    websComputeAllUserAbilities
(void )
  </div>
  <div class="apiDetail">
<p>Compute the abilities for all users by resolving roles into abilities.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_auth_1gac59e51db50106639503b066a95258b75"></a>
<div class="api">
  <div class="prototype">
    <a href="#group___webs_1ga196a6343b64e6944f3b77b8af709a7e8" class="ref">WebsVerify</a>
    websGetPasswordStoreVerify
(void )
  </div>
  <div class="apiDetail">
<p>Set the password store verify callback.</p>
    <dl><dt>Returns:</dt><dd>Verify WebsVerify callback function.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_auth_1gac4ce05bc63317ae4689e42b0bba4f6b7"></a>
<div class="api">
  <div class="prototype">
    <a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="ref">WebsHash</a>
    websGetRoles
(void )
  </div>
  <div class="apiDetail">
<p>Get the roles hash.</p>
    <dl><dt>Returns:</dt><dd>The roles hash object.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_auth_1gad3d4ca84a25b0efea6d8aca2bf3784d5"></a>
<div class="api">
  <div class="prototype">
    <a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="ref">WebsHash</a>
    websGetUsers
(void )
  </div>
  <div class="apiDetail">
<p>Get the users hash.</p>
    <dl><dt>Returns:</dt><dd>The users hash object.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_auth_1ga0359ac96f9112adc03baa0ed6d4740d6"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    websLoginUser
(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *username, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *password)
  </div>
  <div class="apiDetail">
<p>Login a user by verifying the login credentials.</p>
    <dl><dt><b>Description</b>:</dt><dd>This may be called by handlers to manually authenticate a user.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">username</td><td>User name.</td>
    <tr><td class="param">password</td><td>User password (encrypted).</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the user can be authenticated.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_auth_1ga2ce714b242d8f8d184daaa82eadb1aaf"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    websLogoutUser
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Logout a user and remove the user login session.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if successful.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_auth_1ga3ebda5094fd5aaf033c0a01f666db5e2"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_webs_user" class="ref">WebsUser</a> *
    websLookupUser
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *username)
  </div>
  <div class="apiDetail">
<p>Lookup if a user exists.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">username</td><td>User name to search for.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>User object or null if the user cannot be found.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_auth_1ga7653f9dcb2904cd3632b019273c02ade"></a>
<div class="api">
  <div class="prototype">
    int
    websOpenAuth
(int minimal)
  </div>
  <div class="apiDetail">
<p>Open the authentication module.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">minimal</td><td>Reserved. Set to zero.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the user has the required ability.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_auth_1ga19bedf7e54b1993a08f2f6e7ae7dea9c"></a>
<div class="api">
  <div class="prototype">
    int
    websRemoveRole
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *role)
  </div>
  <div class="apiDetail">
<p>Remove a role from the system.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">role</td><td>Role name.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_auth_1gaada9cd540cd4c0f488c0acfa1558d4fd"></a>
<div class="api">
  <div class="prototype">
    int
    websRemoveUser
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)
  </div>
  <div class="apiDetail">
<p>Remove a user from the system.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">name</td><td>User name.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_auth_1gac050abeadb21db4a90197eab284b115b"></a>
<div class="api">
  <div class="prototype">
    void
    websSetPasswordStoreVerify
(<a href="#group___webs_1ga196a6343b64e6944f3b77b8af709a7e8" class="ref">WebsVerify</a> verify)
  </div>
  <div class="apiDetail">
<p>Set the password store verify callback.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">verify</td><td>WebsVerify callback function.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_auth_1gabf304efa46ec70b19997a6587344c6d1"></a>
<div class="api">
  <div class="prototype">
    int
    websSetUserPassword
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *username, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *password)
  </div>
  <div class="apiDetail">
<p>Set a password for the user.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">username</td><td>User name.</td>
    <tr><td class="param">password</td><td>Null terminated password string.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_auth_1gad77d33b025ea6680b2172f2dac62639b"></a>
<div class="api">
  <div class="prototype">
    int
    websSetUserRoles
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *username, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *roles)
  </div>
  <div class="apiDetail">
<p>Define the set of roles for a user.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">username</td><td>User name.</td>
    <tr><td class="param">roles</td><td>Space separated list of roles or abilities.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_auth_1ga85dd3dca55f2cba94bd02ac206acb70f"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    websVerifyPasswordFromCustom
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>User password verification routine from a custom password back-end store.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the user password verifies.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_auth_1gacf13eed5b4f7dff570f75098a1e34923"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    websVerifyPasswordFromFile
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>User password verification routine from auth.txt.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the user password verifies.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<h1>WebsBuf</h1>
<a name="group___webs_buf"></a>
<div class="api">
  <div class="prototype">WebsBuf</div>
  <div class="apiDetail">
<p>A WebsBuf (ring queue) allows maximum utilization of memory for data storage and is ideal for input/output buffering.</p>
    <dl><dt><b>Description</b>:</dt><dd>This module provides a highly efficient implementation and a vehicle for dynamic strings. WARNING: This is a public implementation and callers have full access to the queue structure and pointers. Change this module very carefully. <br/><br/>
This module follows the open/close model. <br/><br/>
Operation of a WebsBuf where bp is a pointer to a WebsBuf : <verbatim>bp-&gt;buflen contains the size of the buffer.
bp-&gt;buf will point to the start of the buffer.
bp-&gt;servp will point to the first (un-consumed) data byte.
bp-&gt;endp will point to the next free location to which new data is added
bp-&gt;endbuf will point to one past the end of the buffer.
</verbatim><br/><br/>
Eg. If the WebsBuf contains the data &quot;abcdef&quot;, it might look like : <br/><br/>
+&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;<mdash/>+ | | | | | | | | a | b | c | d | e | f | | | | | +&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;<mdash/>+ ^ ^ ^ ^ | | | | bp-&gt;buf bp-&gt;servp bp-&gt;endp bp-&gt;enduf <br/><br/>
The queue is empty when servp == endp. This means that the queue will hold at most bp-&gt;buflen -1 bytes. It is the fillers responsibility to ensure the WebsBuf is never filled such that servp == endp. <br/><br/>
It is the fillers responsibility to &quot;wrap&quot; the endp back to point to bp-&gt;buf when the pointer steps past the end. Correspondingly it is the consumers responsibility to &quot;wrap&quot; the servp when it steps to bp-&gt;endbuf. The bufPutc and bufGetc routines will do this automatically.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">char *</td><td><td>buf</td><td>
Holding buffer for data.
</td>
    <tr><td class="param">ssize</td><td><td>buflen</td><td>
Length of ring queue.
</td>
    <tr><td class="param">char *</td><td><td>endbuf</td><td>
Pointer to end of buffer.
</td>
    <tr><td class="param">char *</td><td><td>endp</td><td>
Pointer to end of data.
</td>
    <tr><td class="param">int</td><td><td>increment</td><td>
Growth increment.
</td>
    <tr><td class="param">ssize</td><td><td>maxsize</td><td>
Maximum size.
</td>
    <tr><td class="param">char *</td><td><td>servp</td><td>
Pointer to start of data.
</td>
    </table></dd></dl>
  </div>
</div>
<a name="group___webs_buf_1ga1838678c03f471aed89edfa5db822272"></a>
<div class="api">
  <div class="prototype">
    void
    bufAddNull
(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)
  </div>
  <div class="apiDetail">
<p>Add a trailing null to the buffer.</p>
The end pointer is not changed
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">bp</td><td>Buffer reference.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_buf_1ga7fb267b66c30173cf035560028e83eba"></a>
<div class="api">
  <div class="prototype">
    void
    bufAdjustEnd
(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)
  </div>
  <div class="apiDetail">
<p>Adjust the endp pointer by the specified size.</p>
    <dl><dt><b>Description</b>:</dt><dd>This is useful after manually copying data into the buffer and needing to adjust the end pointer.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">bp</td><td>Buffer reference.</td>
    <tr><td class="param">size</td><td>Size of adjustment. May be positive or negative value.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_buf_1ga89be85c8255bbe0b7a414af5f1587600"></a>
<div class="api">
  <div class="prototype">
    void
    bufAdjustStart
(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> count)
  </div>
  <div class="apiDetail">
<p>Adjust the start (servp) reference.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">bp</td><td>Buffer reference.</td>
    <tr><td class="param">count</td><td>Number of bytes to adjust.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_buf_1ga9ffe6a1664c7911d12e01f317fc18458"></a>
<div class="api">
  <div class="prototype">
    void
    bufCompact
(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)
  </div>
  <div class="apiDetail">
<p>Compact the data in the buffer and move to the start of the buffer.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">bp</td><td>Buffer reference.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_buf_1ga5acfca7bd6b154817530a4551de9a4a6"></a>
<div class="api">
  <div class="prototype">
    int
    bufCreate
(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, int increment, int maxsize)
  </div>
  <div class="apiDetail">
<p>Create a buffer.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">bp</td><td>Buffer reference.</td>
    <tr><td class="param">increment</td><td>Incremental size to grow the buffer. This will be increased by a power of two each time the buffer grows.</td>
    <tr><td class="param">maxsize</td><td>Maximum size of the buffer.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_buf_1gaf5a93373e65f8a7ccb456eb4bf72bba8"></a>
<div class="api">
  <div class="prototype">
    void
    bufFlush
(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)
  </div>
  <div class="apiDetail">
<p>Flush all data in the buffer and reset the pointers.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">bp</td><td>Buffer reference.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_buf_1gacda55401603f555af52faee39639d78c"></a>
<div class="api">
  <div class="prototype">
    void
    bufFree
(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)
  </div>
  <div class="apiDetail">
<p>Free allocated storage for the buffer.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">bp</td><td>Buffer reference.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_buf_1gaa3a7777b78cd891c746772b5c489fd99"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    bufGetBlk
(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, char *blk, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)
  </div>
  <div class="apiDetail">
<p>Copy a block of from the buffer and adjust the servp.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">bp</td><td>Buffer reference.</td>
    <tr><td class="param">blk</td><td>Block into which to place the data.</td>
    <tr><td class="param">len</td><td>Length of the block.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Number of bytes copied.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_buf_1gafa8400821880a8f4d9f1cad4a9595626"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    bufGetBlkMax
(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)
  </div>
  <div class="apiDetail">
<p>Return the maximum number of bytes the buffer can provide via a single block copy.</p>
    <dl><dt><b>Description</b>:</dt><dd>Useful if the user is doing their own data retrieval.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">bp</td><td>Buffer reference.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Number of bytes available for copying.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_buf_1gaad216addfbff3e9ecacdf4f4a651ac90"></a>
<div class="api">
  <div class="prototype">
    int
    bufGetc
(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)
  </div>
  <div class="apiDetail">
<p>Get a character from the buffer and increment the servp.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">bp</td><td>Buffer reference.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The next character or -1 if the buffer is empty.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_buf_1ga48fc76d92c206efcfdf3a376f85214dd"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    bufGrow
(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> room)
  </div>
  <div class="apiDetail">
<p>Grow the buffer by at least the required amount of room.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">bp</td><td>Buffer reference.</td>
    <tr><td class="param">room</td><td>Available size required after growing the buffer.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the buffer can be grown to have the required amount of room.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_buf_1gaa0ae470cc24e8e57db77e42ffb751b83"></a>
<div class="api">
  <div class="prototype">
    int
    bufInsertc
(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, char c)
  </div>
  <div class="apiDetail">
<p>Insert a character to the buffer before the servp position and decrement the servp.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">bp</td><td>Buffer reference.</td>
    <tr><td class="param">c</td><td>Character to insert.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_buf_1ga284f3c18de56b775c0a13f58f78d4744"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    bufLen
(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)
  </div>
  <div class="apiDetail">
<p>Get the length of available data in the buffer.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">bp</td><td>Buffer reference.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Size of available data in bytes.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_buf_1ga31ab202e1cef11fa44e7232100fc500f"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    bufPut
(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)
  </div>
  <div class="apiDetail">
<p>Append a formatted string to the buffer at the endp position and increment the endp.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">bp</td><td>Buffer reference.</td>
    <tr><td class="param">fmt</td><td>Printf style format string.</td>
    <tr><td class="param">...</td><td>Variable arguments for the format string.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Count of characters appended. Returns negative if there is an allocation error.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_buf_1gad14675b48245dc6eaabd6e6da8686a73"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    bufPutBlk
(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *blk, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)
  </div>
  <div class="apiDetail">
<p>Put a block to the buffer.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">bp</td><td>Buffer reference.</td>
    <tr><td class="param">blk</td><td>Block to append to the buffer.</td>
    <tr><td class="param">len</td><td>Size of the block.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Length of data appended. Should equal len.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_buf_1ga7c38d63ce718b544ebdb32807a34ca3e"></a>
<div class="api">
  <div class="prototype">
    int
    bufPutc
(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, char c)
  </div>
  <div class="apiDetail">
<p>Append a character to the buffer at the endp position and increment the endp.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">bp</td><td>Buffer reference.</td>
    <tr><td class="param">c</td><td>Character to append.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_buf_1gaea6647f6507f65ea81faf7c47e8703e1"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> ssize
    ssize bufPutStr
(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
  </div>
  <div class="apiDetail">
<p>Append a string to the buffer at the endp position and increment the endp.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">bp</td><td>Buffer reference.</td>
    <tr><td class="param">str</td><td>String to append.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Count of characters appended. Returns negative if there is an allocation error.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_buf_1gaa1f359ca367a6f72ebaa4b4028732333"></a>
<div class="api">
  <div class="prototype">
    void
    bufReset
(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)
  </div>
  <div class="apiDetail">
<p>Reset the buffer pointers to the start of the buffer if empty.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">bp</td><td>Buffer reference.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_buf_1ga2ffac4a06b33a774a59e0441bbf0a555"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    bufRoom
(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)
  </div>
  <div class="apiDetail">
<p>Determine the room available in the buffer.</p>
    <dl><dt><b>Description</b>:</dt><dd>This returns the maximum number of bytes the buffer can absorb in a single block copy.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">bp</td><td>Buffer reference.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Number of bytes of available space.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_buf_1ga62f58e280d1d6706e8eb0637963f658e"></a>
<div class="api">
  <div class="prototype">
    char *
    bufStart
(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)
  </div>
  <div class="apiDetail">
<p>Get a reference to the start of buffer data.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">bp</td><td>Buffer reference.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A string pointer.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<h1>WebsHash</h1>
<a name="goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67"></a>
<div class="api">
  <div class="prototype">WebsHash</div>
  <div class="apiDetail">
<p>Hash table entry structure.</p>
    <dl><dt><b>Description</b>:</dt><dd>The hash structure supports growable hash tables with high performance, collision resistant hashes. Each hash entry has a descriptor entry. This is used to manage the hash table link chains.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_hash_1ga38965650a2f6f2666e0120498594a135" class="ref">hashCreate</a>, <a href="#group___webs_hash_1ga9ba32a89679bec0a778ce61dbc7a8e7b" class="ref">hashDelete</a>, <a href="#group___webs_hash_1ga71278c9972c9252d0f6c34cda14bc156" class="ref">hashEnter</a>, <a href="#group___webs_hash_1gac33b2f81aa5b83316a20dd6ea6da9bd1" class="ref">hashFirst</a>, <a href="#group___webs_hash_1gae27ba1e72086c5fbc0019882c88129ea" class="ref">hashFree</a>, <a href="#group___webs_hash_1gae4dee9e0f69cd3e5a85b0952b022a414" class="ref">hashLookup</a>, <a href="#group___webs_hash_1gad26ba48ce394674a7e026dcc876f4e21" class="ref">hashNext</a></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
    </table></dd></dl>
  </div>
</div>
<a name="group___webs_hash_1ga38965650a2f6f2666e0120498594a135"></a>
<div class="api">
  <div class="prototype">
    <a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="ref">WebsHash</a>
    hashCreate
(int size)
  </div>
  <div class="apiDetail">
<p>Create a hash table.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">size</td><td>Minimum size of the hash index.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Hash table ID. Negative if the hash cannot be created.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_hash_1ga9ba32a89679bec0a778ce61dbc7a8e7b" class="ref">hashDelete</a>, <a href="#group___webs_hash_1ga71278c9972c9252d0f6c34cda14bc156" class="ref">hashEnter</a>, <a href="#group___webs_hash_1gac33b2f81aa5b83316a20dd6ea6da9bd1" class="ref">hashFirst</a>, <a href="#group___webs_hash_1gae27ba1e72086c5fbc0019882c88129ea" class="ref">hashFree</a>, <a href="#group___webs_hash_1gae4dee9e0f69cd3e5a85b0952b022a414" class="ref">hashLookup</a>, <a href="#group___webs_hash_1gad26ba48ce394674a7e026dcc876f4e21" class="ref">hashNext</a></dd></dl>
  </div>
</div>
<a name="group___webs_hash_1ga9ba32a89679bec0a778ce61dbc7a8e7b"></a>
<div class="api">
  <div class="prototype">
    int
    hashDelete
(<a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="ref">WebsHash</a> id, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)
  </div>
  <div class="apiDetail">
<p>Delete a key by name.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">id</td><td>Hash table id returned by hashCreate.</td>
    <tr><td class="param">name</td><td>Key name to delete.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if the delete was successful. Otherwise -1 if the key was not found.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_hash_1ga38965650a2f6f2666e0120498594a135" class="ref">hashCreate</a>, <a href="#group___webs_hash_1ga71278c9972c9252d0f6c34cda14bc156" class="ref">hashEnter</a>, <a href="#group___webs_hash_1gac33b2f81aa5b83316a20dd6ea6da9bd1" class="ref">hashFirst</a>, <a href="#group___webs_hash_1gae27ba1e72086c5fbc0019882c88129ea" class="ref">hashFree</a>, <a href="#group___webs_hash_1gae4dee9e0f69cd3e5a85b0952b022a414" class="ref">hashLookup</a>, <a href="#group___webs_hash_1gad26ba48ce394674a7e026dcc876f4e21" class="ref">hashNext</a></dd></dl>
  </div>
</div>
<a name="group___webs_hash_1ga71278c9972c9252d0f6c34cda14bc156"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_webs_key" class="ref">WebsKey</a> *
    hashEnter
(<a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="ref">WebsHash</a> id, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="#struct_webs_value" class="ref">WebsValue</a> value, int arg)
  </div>
  <div class="apiDetail">
<p>Enter a new key and value into the hash table.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">id</td><td>Hash table id returned by hashCreate.</td>
    <tr><td class="param">name</td><td>Key name to create.</td>
    <tr><td class="param">value</td><td>Key value to enter.</td>
    <tr><td class="param">arg</td><td>Optional extra argument to store with the value.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Reference to the WebKey object storing the key and value.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_hash_1ga38965650a2f6f2666e0120498594a135" class="ref">hashCreate</a>, <a href="#group___webs_hash_1ga9ba32a89679bec0a778ce61dbc7a8e7b" class="ref">hashDelete</a>, <a href="#group___webs_hash_1gac33b2f81aa5b83316a20dd6ea6da9bd1" class="ref">hashFirst</a>, <a href="#group___webs_hash_1gae27ba1e72086c5fbc0019882c88129ea" class="ref">hashFree</a>, <a href="#group___webs_hash_1gae4dee9e0f69cd3e5a85b0952b022a414" class="ref">hashLookup</a>, <a href="#group___webs_hash_1gad26ba48ce394674a7e026dcc876f4e21" class="ref">hashNext</a></dd></dl>
  </div>
</div>
<a name="group___webs_hash_1gac33b2f81aa5b83316a20dd6ea6da9bd1"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_webs_key" class="ref">WebsKey</a> *
    hashFirst
(<a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="ref">WebsHash</a> id)
  </div>
  <div class="apiDetail">
<p>Start walking the hash keys by returning the first key entry in the hash.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">id</td><td>Hash table id returned by hashCreate.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Reference to the first WebKey object. Return null if there are no keys in the hash.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_hash_1ga38965650a2f6f2666e0120498594a135" class="ref">hashCreate</a>, <a href="#group___webs_hash_1ga9ba32a89679bec0a778ce61dbc7a8e7b" class="ref">hashDelete</a>, <a href="#group___webs_hash_1ga71278c9972c9252d0f6c34cda14bc156" class="ref">hashEnter</a>, <a href="#group___webs_hash_1gae27ba1e72086c5fbc0019882c88129ea" class="ref">hashFree</a>, <a href="#group___webs_hash_1gae4dee9e0f69cd3e5a85b0952b022a414" class="ref">hashLookup</a>, <a href="#group___webs_hash_1gad26ba48ce394674a7e026dcc876f4e21" class="ref">hashNext</a></dd></dl>
  </div>
</div>
<a name="group___webs_hash_1gae27ba1e72086c5fbc0019882c88129ea"></a>
<div class="api">
  <div class="prototype">
    void
    hashFree
(<a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="ref">WebsHash</a> id)
  </div>
  <div class="apiDetail">
<p>Free a hash table.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">id</td><td>Hash table id returned by hashCreate.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_hash_1ga38965650a2f6f2666e0120498594a135" class="ref">hashCreate</a>, <a href="#group___webs_hash_1ga9ba32a89679bec0a778ce61dbc7a8e7b" class="ref">hashDelete</a>, <a href="#group___webs_hash_1ga71278c9972c9252d0f6c34cda14bc156" class="ref">hashEnter</a>, <a href="#group___webs_hash_1gac33b2f81aa5b83316a20dd6ea6da9bd1" class="ref">hashFirst</a>, <a href="#group___webs_hash_1gae4dee9e0f69cd3e5a85b0952b022a414" class="ref">hashLookup</a>, <a href="#group___webs_hash_1gad26ba48ce394674a7e026dcc876f4e21" class="ref">hashNext</a></dd></dl>
  </div>
</div>
<a name="group___webs_hash_1gae4dee9e0f69cd3e5a85b0952b022a414"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_webs_key" class="ref">WebsKey</a> *
    hashLookup
(<a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="ref">WebsHash</a> id, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)
  </div>
  <div class="apiDetail">
<p>Lookup a name in the hash table.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">id</td><td>Hash table id returned by hashCreate.</td>
    <tr><td class="param">name</td><td>Key name to search for.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Reference to the WebKey object storing the key and value.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_hash_1ga38965650a2f6f2666e0120498594a135" class="ref">hashCreate</a>, <a href="#group___webs_hash_1ga9ba32a89679bec0a778ce61dbc7a8e7b" class="ref">hashDelete</a>, <a href="#group___webs_hash_1ga71278c9972c9252d0f6c34cda14bc156" class="ref">hashEnter</a>, <a href="#group___webs_hash_1gac33b2f81aa5b83316a20dd6ea6da9bd1" class="ref">hashFirst</a>, <a href="#group___webs_hash_1gae27ba1e72086c5fbc0019882c88129ea" class="ref">hashFree</a>, <a href="#group___webs_hash_1gad26ba48ce394674a7e026dcc876f4e21" class="ref">hashNext</a></dd></dl>
  </div>
</div>
<a name="group___webs_hash_1ga1ca237f892334fd5a59387dc0c230f0d"></a>
<div class="api">
  <div class="prototype">
    void *
    hashLookupSymbol
(<a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="ref">WebsHash</a> sd, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)
  </div>
  <div class="apiDetail">
<p>Lookup a name in the hash table and return a symbol reference.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sd</td><td>Hash table id returned by hashCreate.</td>
    <tr><td class="param">name</td><td>Key name to search for.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Reference to the symbole.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Evolving.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_hash_1ga38965650a2f6f2666e0120498594a135" class="ref">hashCreate</a>, <a href="#group___webs_hash_1ga9ba32a89679bec0a778ce61dbc7a8e7b" class="ref">hashDelete</a>, <a href="#group___webs_hash_1ga71278c9972c9252d0f6c34cda14bc156" class="ref">hashEnter</a>, <a href="#group___webs_hash_1gac33b2f81aa5b83316a20dd6ea6da9bd1" class="ref">hashFirst</a>, <a href="#group___webs_hash_1gae27ba1e72086c5fbc0019882c88129ea" class="ref">hashFree</a>, <a href="#group___webs_hash_1gae4dee9e0f69cd3e5a85b0952b022a414" class="ref">hashLookup</a>, <a href="#group___webs_hash_1gad26ba48ce394674a7e026dcc876f4e21" class="ref">hashNext</a></dd></dl>
  </div>
</div>
<a name="group___webs_hash_1gad26ba48ce394674a7e026dcc876f4e21"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_webs_key" class="ref">WebsKey</a> *
    hashNext
(<a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="ref">WebsHash</a> id, <a href="#struct_webs_key" class="ref">WebsKey</a> *last)
  </div>
  <div class="apiDetail">
<p>Continue walking the hash keys by returning the next key entry in the hash.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">id</td><td>Hash table id returned by hashCreate.</td>
    <tr><td class="param">last</td><td>Reference to a WebsKey to hold the current traversal key state.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Reference to the next WebKey object. Returns null if no more keys exist to be traversed.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_hash_1ga38965650a2f6f2666e0120498594a135" class="ref">hashCreate</a>, <a href="#group___webs_hash_1ga9ba32a89679bec0a778ce61dbc7a8e7b" class="ref">hashDelete</a>, <a href="#group___webs_hash_1ga71278c9972c9252d0f6c34cda14bc156" class="ref">hashEnter</a>, <a href="#group___webs_hash_1gac33b2f81aa5b83316a20dd6ea6da9bd1" class="ref">hashFirst</a>, <a href="#group___webs_hash_1gae27ba1e72086c5fbc0019882c88129ea" class="ref">hashFree</a>, <a href="#group___webs_hash_1gae4dee9e0f69cd3e5a85b0952b022a414" class="ref">hashLookup</a></dd></dl>
  </div>
</div>
<h1>WebsRoute</h1>
<a name="group___webs_route"></a>
<div class="api">
  <div class="prototype">WebsRoute</div>
  <div class="apiDetail">
<p>Request route structure.</p>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">WebsHash</td><td><td>abilities</td><td>
Required user abilities.
</td>
    <tr><td class="param"><a class="ref" href="#group___webs_1ga00798847832d6e6b032e7423a3bf5bb2">WebsAskLogin</a></td><td><td>askLogin</td><td>
Route path prefix.
</td>
    <tr><td class="param">char *</td><td><td>authType</td><td>
Authentication type.
</td>
    <tr><td class="param">char *</td><td><td>dir</td><td>
Filesystem base directory for route documents.
</td>
    <tr><td class="param">WebsHash</td><td><td>extensions</td><td>
Permissible URI extensions.
</td>
    <tr><td class="param">int</td><td><td>flags</td><td>
Route control flags.
</td>
    <tr><td class="param"><a class="ref" href="#struct_webs_handler">WebsHandler</a> *</td><td><td>handler</td><td>
Request handler to service requests.
</td>
    <tr><td class="param">WebsHash</td><td><td>methods</td><td>
Supported HTTP methods.
</td>
    <tr><td class="param"><a class="ref" href="#group___webs_1ga8813a82488191e0cb2df0f7cafcd1414">WebsParseAuth</a></td><td><td>parseAuth</td><td>
Parse authentication details callback.
</td>
    <tr><td class="param">char *</td><td><td>prefix</td><td>
Route path prefix.
</td>
    <tr><td class="param">ssize</td><td><td>prefixLen</td><td>
Prefix length.
</td>
    <tr><td class="param">char *</td><td><td>protocol</td><td>
HTTP protocol to use for this route.
</td>
    <tr><td class="param">WebsHash</td><td><td>redirects</td><td>
Response redirections.
</td>
    <tr><td class="param"><a class="ref" href="#group___webs_1ga196a6343b64e6944f3b77b8af709a7e8">WebsVerify</a></td><td><td>verify</td><td>
Verify password callback.
</td>
    </table></dd></dl>
  </div>
</div>
<a name="group___webs_route_1ga591531eedbacb9dbe29c0461ebbdd9eb"></a>
<div class="api">
  <div class="prototype">
    <a href="#group___webs_route" class="ref">WebsRoute</a> *
    websAddRoute
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *uri, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *handler, int pos)
  </div>
  <div class="apiDetail">
<p>Add a route to the routing tables.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">uri</td><td>Matching URI prefix.</td>
    <tr><td class="param">handler</td><td>Request handler to service routed requests.</td>
    <tr><td class="param">pos</td><td>Position in the list of routes. Zero inserts at the front of the list. A value of -1 will append to the end of the list.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A route object.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_route_1ga712fb5968ea34647fbd198b281576b4e"></a>
<div class="api">
  <div class="prototype">
    void
    websCloseRoute
(void )
  </div>
  <div class="apiDetail">
<p>Close the route module.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_route_1ga84cade4d96e10f90f48a89403ffe8585"></a>
<div class="api">
  <div class="prototype">
    int
    websLoad
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
  </div>
  <div class="apiDetail">
<p>Load routing tables from the specified filename.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Route configuration filename.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_route_1ga22d74d0805089decff152b0a35d4442f"></a>
<div class="api">
  <div class="prototype">
    int
    websOpenRoute
(void )
  </div>
  <div class="apiDetail">
<p>Open the routing module.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_route_1gadccfe94478f976a3a93b8a5b9be1acc0"></a>
<div class="api">
  <div class="prototype">
    int
    websRemoveRoute
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *uri)
  </div>
  <div class="apiDetail">
<p>Remove a route from the routing tables.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">uri</td><td>Matching URI prefix.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_route_1gabac20ffa1da08fefb06d471c6a589c1d"></a>
<div class="api">
  <div class="prototype">
    void
    websRouteRequest
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Route a request.</p>
    <dl><dt><b>Description</b>:</dt><dd>This routine will select a matching route and will invoke the selected route handler to service the request. In the process, authentication and request rewriting may take place. This routine is called internally by the request pipeline.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_route_1ga13356d1f5c87381edd681495e5187bcd"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    websRunRequest
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Run a request handler.</p>
    <dl><dt><b>Description</b>:</dt><dd>This routine will run the handler and route selected by <a class="ref" href="#group___webs_route_1gabac20ffa1da08fefb06d471c6a589c1d">websRouteRequest</a>. This routine is called internally by the request pipeline.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the handler serviced the request. Return false to test other routes to handle this request. This is for legacy handlers that do not have a match callback.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_route_1ga0326b013f41e0911bfd8c28f7041f209"></a>
<div class="api">
  <div class="prototype">
    int
    websSetRouteAuth
(<a href="#group___webs_route" class="ref">WebsRoute</a> *route, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *authType)
  </div>
  <div class="apiDetail">
<p>Set route authentication scheme.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">route</td><td>Route to modify.</td>
    <tr><td class="param">authType</td><td>Set to &quot;basic&quot;, &quot;digest&quot; or &quot;form&quot;.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_route_1ga02ded6cfc279652c2dca6d86f2adc8d8"></a>
<div class="api">
  <div class="prototype">
    int
    websSetRouteMatch
(<a href="#group___webs_route" class="ref">WebsRoute</a> *route, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *dir, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *protocol, <a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="ref">WebsHash</a> methods, <a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="ref">WebsHash</a> extensions, <a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="ref">WebsHash</a> abilities, <a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="ref">WebsHash</a> redirects)
  </div>
  <div class="apiDetail">
<p>Configure a route by adding matching criteria.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">route</td><td>Route to modify.</td>
    <tr><td class="param">dir</td><td>Set the route documents directory filename.</td>
    <tr><td class="param">protocol</td><td>Set the matching HTTP protocol (http or https).</td>
    <tr><td class="param">methods</td><td>Hash of permissible HTTP methods. (GET, HEAD, POST, PUT).</td>
    <tr><td class="param">extensions</td><td>Hash of permissible URI filename extensions.</td>
    <tr><td class="param">abilities</td><td>Required user abilities. If abilities are required, the user must be authenticated.</td>
    <tr><td class="param">redirects</td><td>Set of applicable response redirections when completing the request.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Evolving.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<h1>WebsRuntime</h1>
<a name="group___webs_runtime"></a>
<div class="api">
  <div class="prototype">WebsRuntime</div>
  <div class="apiDetail">
<p>GoAhead Web Server Runtime.</p>
    <dl><dt><b>Description</b>:</dt><dd>GoAhead provides a secure runtime environment for safe string manipulation and to help prevent buffer overflows and other potential security traps.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
    </table></dd></dl>
  </div>
</div>
<a name="group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f"></a>
<div class="api">
  <div class="prototype">
    char *
    fmt
(char *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> maxSize, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *format, ...)
  </div>
  <div class="apiDetail">
<p>Format a string into a static buffer.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call format a string using printf style formatting arguments. A trailing null will always be appended. The call returns the size of the allocated string excluding the null.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Pointer to the buffer.</td>
    <tr><td class="param">maxSize</td><td>Size of the buffer.</td>
    <tr><td class="param">format</td><td>Printf style format string.</td>
    <tr><td class="param">...</td><td>Variable arguments to format.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The buffer.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
  </div>
</div>
<a name="group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a91ad9478d81a7aaf2593e8d9c3d06a14" class="ref">uint</a>
    hextoi
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
  </div>
  <div class="apiDetail">
<p>Convert a hex string to an integer.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call converts the supplied string to an integer using base 16.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>Pointer to the string to parse.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The integer equivalent value of the string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
  </div>
</div>
<a name="group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780"></a>
<div class="api">
  <div class="prototype">
    char *
    itosbuf
(char *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size, <a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a> value, int radix)
  </div>
  <div class="apiDetail">
<p>Convert an integer to a string buffer.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call converts the supplied 64 bit integer into a string formatted into the supplied buffer according to the specified radix.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Pointer to the buffer that will hold the string.</td>
    <tr><td class="param">size</td><td>Size of the buffer.</td>
    <tr><td class="param">value</td><td>Integer value to convert.</td>
    <tr><td class="param">radix</td><td>The base radix to use when encoding the number.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a reference to the string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
  </div>
</div>
<a name="group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2"></a>
<div class="api">
  <div class="prototype">
    int
    scaselesscmp
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2)
  </div>
  <div class="apiDetail">
<p>Compare strings ignoring case.</p>
This is a safe replacement for strcasecmp. It can handle NULL args
    <dl><dt><b>Description</b>:</dt><dd>Compare two strings ignoring case differences. This call operates similarly to strcmp.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">s1</td><td>First string to compare.</td>
    <tr><td class="param">s2</td><td>Second string to compare.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns zero if the strings are equivalent, &lt; 0 if s1 sorts lower than s2 in the collating sequence or &gt; 0 if it sorts higher.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
  </div>
</div>
<a name="group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    scaselessmatch
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2)
  </div>
  <div class="apiDetail">
<p>Compare strings ignoring case.</p>
This is similar to scaselesscmp but it returns a boolean
    <dl><dt><b>Description</b>:</dt><dd>Compare two strings ignoring case differences.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">s1</td><td>First string to compare.</td>
    <tr><td class="param">s2</td><td>Second string to compare.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns true if the strings are equivalent, otherwise false.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
  </div>
</div>
<a name="group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46"></a>
<div class="api">
  <div class="prototype">
    char *
    sclone
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
  </div>
  <div class="apiDetail">
<p>Clone a string.</p>
    <dl><dt><b>Description</b>:</dt><dd>Copy a string into a newly allocated block.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>Pointer to the block to duplicate.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a newly allocated string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
  </div>
</div>
<a name="group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139"></a>
<div class="api">
  <div class="prototype">
    int
    scmp
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2)
  </div>
  <div class="apiDetail">
<p>Compare strings.</p>
    <dl><dt><b>Description</b>:</dt><dd>Compare two strings. This is a safe replacement for strcmp. It can handle null args.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">s1</td><td>First string to compare.</td>
    <tr><td class="param">s2</td><td>Second string to compare.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns zero if the strings are identical. Return -1 if the first string is less than the second. Return 1 if the first string is greater than the second.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
  </div>
</div>
<a name="group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    scopy
(char *dest, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> destMax, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *src)
  </div>
  <div class="apiDetail">
<p>Copy a string.</p>
    <dl><dt><b>Description</b>:</dt><dd>Safe replacement for strcpy. Copy a string and ensure the destination buffer is not overflowed. The call returns the length of the resultant string or an error code if it will not fit into the target string. This is similar to strcpy, but it will enforce a maximum size for the copied string and will ensure it is always terminated with a null.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">dest</td><td>Pointer to a pointer that will hold the address of the allocated block.</td>
    <tr><td class="param">destMax</td><td>Maximum size of the target string in characters.</td>
    <tr><td class="param">src</td><td>String to copy.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The number of characters in the target string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
  </div>
</div>
<a name="group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed"></a>
<div class="api">
  <div class="prototype">
    char *
    sfmt
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *format, ...)
  </div>
  <div class="apiDetail">
<p>Format a string.</p>
This is a secure version of printf that can handle null args
    <dl><dt><b>Description</b>:</dt><dd>Format the given arguments according to the printf style format. See <a class="ref" href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f">fmt()</a> for a full list of the format specifies. This is a secure replacement for sprintf, it can handle null arguments without crashes.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">format</td><td>Printf style format string.</td>
    <tr><td class="param">...</td><td>Variable arguments for the format string.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a newly allocated string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
  </div>
</div>
<a name="group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417"></a>
<div class="api">
  <div class="prototype">
    char *
    sfmtv
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *format, va_list args)
  </div>
  <div class="apiDetail">
<p>Format a string with varargs.</p>
This is a secure version of printf that can handle null args
    <dl><dt><b>Description</b>:</dt><dd>Format the given arguments according to the printf style format. See <a class="ref" href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f">fmt()</a> for a full list of the format specifies. This is a secure replacement for sprintf, it can handle null arguments without crashes.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">format</td><td>Printf style format string.</td>
    <tr><td class="param">args</td><td>Varargs argument obtained from va_start.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a newly allocated string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
  </div>
</div>
<a name="group___webs_runtime_1gade405095134ad54db6dc94fcd6216961"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    slen
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
  </div>
  <div class="apiDetail">
<p>Return the length of a string.</p>
    <dl><dt><b>Description</b>:</dt><dd>Safe replacement for strlen. This call returns the length of a string and tests if the length is less than a given maximum. It will return zero for NULL args.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to measure.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The length of the string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
  </div>
</div>
<a name="group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf"></a>
<div class="api">
  <div class="prototype">
    char *
    slower
(char *str)
  </div>
  <div class="apiDetail">
<p>Convert a string to lower case.</p>
    <dl><dt><b>Description</b>:</dt><dd>Convert a string to its lower case equivalent.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to convert. This string is modified.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Reference to the supplied str. Caller must not free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
  </div>
</div>
<a name="group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    smatch
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2)
  </div>
  <div class="apiDetail">
<p>Compare strings.</p>
    <dl><dt><b>Description</b>:</dt><dd>Compare two strings. This is similar to <a class="ref" href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139">scmp</a> but it returns a boolean.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">s1</td><td>First string to compare.</td>
    <tr><td class="param">s2</td><td>Second string to compare.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns true if the strings are equivalent, otherwise false.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
  </div>
</div>
<a name="group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972"></a>
<div class="api">
  <div class="prototype">
    int
    sncaselesscmp
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)
  </div>
  <div class="apiDetail">
<p>Compare strings ignoring case.</p>
    <dl><dt><b>Description</b>:</dt><dd>Compare two strings ignoring case differences for a given string length. This call operates similarly to strncasecmp.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">s1</td><td>First string to compare.</td>
    <tr><td class="param">s2</td><td>Second string to compare.</td>
    <tr><td class="param">len</td><td>Length of characters to compare.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns zero if the strings are equivalent, &lt; 0 if s1 sorts lower than s2 in the collating sequence or &gt; 0 if it sorts higher.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
  </div>
</div>
<a name="group___webs_runtime_1gafc391546b97fb1fefb3dd78a96acb1b4"></a>
<div class="api">
  <div class="prototype">
    char *
    snclone
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)
  </div>
  <div class="apiDetail">
<p>Clone a substring.</p>
    <dl><dt><b>Description</b>:</dt><dd>Copy a substring into a newly allocated block.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>Pointer to the block to duplicate.</td>
    <tr><td class="param">len</td><td>Number of bytes to copy. The actual length copied is the minimum of the given length and the length of the supplied string. The result is null terminated.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a newly allocated string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
  </div>
</div>
<a name="group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7"></a>
<div class="api">
  <div class="prototype">
    int
    sncmp
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)
  </div>
  <div class="apiDetail">
<p>Compare strings.</p>
    <dl><dt><b>Description</b>:</dt><dd>Compare two strings for a given string length. This call operates similarly to strncmp.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">s1</td><td>First string to compare.</td>
    <tr><td class="param">s2</td><td>Second string to compare.</td>
    <tr><td class="param">len</td><td>Length of characters to compare.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns zero if the strings are equivalent, &lt; 0 if s1 sorts lower than s2 in the collating sequence or &gt; 0 if it sorts higher.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
  </div>
</div>
<a name="group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    sncopy
(char *dest, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> destMax, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *src, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> count)
  </div>
  <div class="apiDetail">
<p>Copy characters from a string.</p>
    <dl><dt><b>Description</b>:</dt><dd>Safe replacement for strncpy. Copy bytes from a string and ensure the target string is not overflowed. The call returns the length of the resultant string or an error code if it will not fit into the target string. This is similar to strcpy, but it will enforce a maximum size for the copied string and will ensure it is terminated with a null.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">dest</td><td>Pointer to a pointer that will hold the address of the allocated block.</td>
    <tr><td class="param">destMax</td><td>Maximum size of the target string in characters.</td>
    <tr><td class="param">src</td><td>String to copy.</td>
    <tr><td class="param">count</td><td>Maximum count of characters to copy.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a reference to the destination if successful or NULL if the string won&apos;t fit.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
  </div>
</div>
<a name="group___webs_runtime_1ga3749b26084eb67b7f76bb7aa48c839d5"></a>
<div class="api">
  <div class="prototype">
    char *
    ssplit
(char *str, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *delim, char **last)
  </div>
  <div class="apiDetail">
<p>Split a string at a delimiter.</p>
    <dl><dt><b>Description</b>:</dt><dd>Split a string and return parts. The string is modified. This routiner never returns null. If there are leading delimiters, the empty string will be returned and *last will be set to the portion after the delimiters. If str is null, an empty string will be returned. If there are no characters after the delimiter, then *last will be set to the empty string.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to tokenize.</td>
    <tr><td class="param">delim</td><td>Set of characters that are used as token separators.</td>
    <tr><td class="param">last</td><td>Reference to the portion after the delimiters. Will return an empty string if is not trailing portion.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a pointer to the first part before the delimiters. If the string begins with delimiters, the empty string will be returned.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Evolving.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
  </div>
</div>
<a name="group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177"></a>
<div class="api">
  <div class="prototype">
    char *
    stok
(char *str, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *delim, char **last)
  </div>
  <div class="apiDetail">
<p>Tokenize a string.</p>
    <dl><dt><b>Description</b>:</dt><dd>Split a string into tokens.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to tokenize.</td>
    <tr><td class="param">delim</td><td>String of characters to use as token separators.</td>
    <tr><td class="param">last</td><td>Last token pointer.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a pointer to the next token.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
  </div>
</div>
<a name="group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657"></a>
<div class="api">
  <div class="prototype">
    char *
    strim
(char *str, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *set, int where)
  </div>
  <div class="apiDetail">
<p>Trim a string.</p>
    <dl><dt><b>Description</b>:</dt><dd>Trim leading and trailing characters off a string.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to trim.</td>
    <tr><td class="param">set</td><td>String of characters to remove.</td>
    <tr><td class="param">where</td><td>Flags to indicate trim from the start, end or both. Use WEBS_TRIM_START, WEBS_TRIM_END, WEBS_TRIM_BOTH.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a pointer to the trimmed string. May not equal str.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
  </div>
</div>
<a name="group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4"></a>
<div class="api">
  <div class="prototype">
    char *
    supper
(char *str)
  </div>
  <div class="apiDetail">
<p>Convert a string to upper case.</p>
    <dl><dt><b>Description</b>:</dt><dd>Convert a string to its upper case equivalent.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to convert. This string is modified.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns a pointer to the converted string. Will always equal str. Caller must not free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
  </div>
</div>
<a name="group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09"></a>
<div class="api">
  <div class="prototype">
    int
    wallocHandle
(void *map)
  </div>
  <div class="apiDetail">
<p>Allocate a handle from a map.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">map</td><td>Reference to a location holding the map reference. On the first call, the map is allocated.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Integer handle index. Otherwise return -1 on allocation errors.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
  </div>
</div>
<a name="group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d"></a>
<div class="api">
  <div class="prototype">
    int
    wallocObject
(void *map, int *max, int size)
  </div>
  <div class="apiDetail">
<p>Allocate an object in a halloc map.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">map</td><td>Reference to a location holding the map reference. On the first call, the map is allocated.</td>
    <tr><td class="param">max</td><td>Reference to an integer that holds the maximum handle in the map.</td>
    <tr><td class="param">size</td><td>Size of the object to allocate.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Integer handle index. Otherwise return -1 on allocation errors.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
  </div>
</div>
<a name="group___webs_runtime_1ga766658ed30f45bec60eef120f2b74c08"></a>
<div class="api">
  <div class="prototype">
    void
    websRestartEvent
(int id, int delay)
  </div>
  <div class="apiDetail">
<p>Restart an event.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">id</td><td>Event id allocated by websStartEvent.</td>
    <tr><td class="param">delay</td><td>Delay in milliseconds till the event next runs.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
  </div>
</div>
<a name="group___webs_runtime_1ga31529c388cac3e90a71766bc445b6575"></a>
<div class="api">
  <div class="prototype">
    int
    websRunEvents
(void )
  </div>
  <div class="apiDetail">
<p>Run due events.</p>
    <dl><dt>Returns:</dt><dd>Time delay till the next event.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
  </div>
</div>
<a name="group___webs_runtime_1ga3d52faf06a56379bb23247aa9a0acb0f"></a>
<div class="api">
  <div class="prototype">
    int
    websStartEvent
(int delay, <a href="#group___webs_runtime_1gacc671375a3241fd84d5151c9dd001dc7" class="ref">WebsEventProc</a> proc, void *data)
  </div>
  <div class="apiDetail">
<p>Start a callback event.</p>
    <dl><dt><b>Description</b>:</dt><dd>This schedules an event to run once. The event can be rescheduled in the callback by invoking websRestartEvent.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">delay</td><td>Delay in milliseconds in which to run the callback.</td>
    <tr><td class="param">proc</td><td>Callback procedure function. Signature is: void (*fn)(void *data, int id).</td>
    <tr><td class="param">data</td><td>Data reference to pass to the callback.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A positive integer event ID.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
  </div>
</div>
<a name="group___webs_runtime_1ga9a6524bc11288246c84651f99fd24425"></a>
<div class="api">
  <div class="prototype">
    void
    websStopEvent
(int id)
  </div>
  <div class="apiDetail">
<p>Stop an event.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">id</td><td>Event id allocated by websStartEvent.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Integer handle index. Otherwise return -1 on allocation errors.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
  </div>
</div>
<a name="group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2"></a>
<div class="api">
  <div class="prototype">
    int
    wfreeHandle
(void *map, int handle)
  </div>
  <div class="apiDetail">
<p>Free a handle in the map.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">map</td><td>Reference to a location to hold the map reference.</td>
    <tr><td class="param">handle</td><td>Handle to free in the map.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Integer handle index. Otherwise return -1 on allocation errors.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a></dd></dl>
  </div>
</div>
<h1>WebsSession</h1>
<a name="group___webs_session"></a>
<div class="api">
  <div class="prototype">WebsSession</div>
  <div class="apiDetail">
<p>Session state storage.</p>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">WebsHash</td><td><td>cache</td><td>
Cache of session variables.
</td>
    <tr><td class="param">WebsTime</td><td><td>expires</td><td>
When the session expires.
</td>
    <tr><td class="param">char *</td><td><td>id</td><td>
Session ID key.
</td>
    <tr><td class="param">int</td><td><td>lifespan</td><td>
Session inactivity timeout (secs).
</td>
    </table></dd></dl>
  </div>
</div>
<a name="group___webs_session_1ga960eb7ffd15820d3305445b257462b9d"></a>
<div class="api">
  <div class="prototype">
    <a href="#group___webs_session" class="ref">WebsSession</a> *
    websAllocSession
(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *id, int lifespan)
  </div>
  <div class="apiDetail">
<p>Test if a user possesses the required ability.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">id</td><td>Session ID to use. Set to null to allocate a new session ID.</td>
    <tr><td class="param">lifespan</td><td>Lifespan of the session in seconds.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Allocated session object.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_session_1ga69bb1da9a9f13651d5a6db9379cb37e9"></a>
<div class="api">
  <div class="prototype">
    <a href="#group___webs_session" class="ref">WebsSession</a> *
    websCreateSession
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Test if a user possesses the required ability.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Allocated session object.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_session_1ga8f9464efab7e9045cab72863ccdb81db"></a>
<div class="api">
  <div class="prototype">
    void
    websDestroySession
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Destroy the webs session object.</p>
    <dl><dt><b>Description</b>:</dt><dd>Useful to be called as part of the user logout process.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Prototype.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_session_1gabaceff85a59337282e9807f62aa046a7"></a>
<div class="api">
  <div class="prototype">
    <a href="#group___webs_session" class="ref">WebsSession</a> *
    websGetSession
(<a href="#group___webs" class="ref">Webs</a> *wp, int create)
  </div>
  <div class="apiDetail">
<p>Get the session state object for the current request.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">create</td><td>Set to true to create a new session if one does not already exist.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Session object.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_session_1gac8c7bf25c2eda7a6a23111f8bff56df7"></a>
<div class="api">
  <div class="prototype">
    char *
    websGetSessionID
(<a href="#group___webs" class="ref">Webs</a> *wp)
  </div>
  <div class="apiDetail">
<p>Get the session ID.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The session ID if session state storage is defined for this request. Caller must free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_session_1gae766fcda76d2f12f44e21a7ed18ffd55"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
    websGetSessionVar
(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *defaultValue)
  </div>
  <div class="apiDetail">
<p>Get a session variable.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">name</td><td>Session variable name.</td>
    <tr><td class="param">defaultValue</td><td>Default value to return if the variable does not exist.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Session variable value or default value if it does not exist.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_session_1ga7ae8ed7ba925a225ee0bad96f3829c56"></a>
<div class="api">
  <div class="prototype">
    void
    websRemoveSessionVar
(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)
  </div>
  <div class="apiDetail">
<p>Remove a session variable.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">name</td><td>Session variable name.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_session_1ga7392f09b1b9c7d9d230701d6d2636a5e"></a>
<div class="api">
  <div class="prototype">
    int
    websSetSessionVar
(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value)
  </div>
  <div class="apiDetail">
<p>Set a session variable name value.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">name</td><td>Session variable name.</td>
    <tr><td class="param">value</td><td>Value to set the variable to.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<h1>WebsSocket</h1>
<a name="group___webs_socket"></a>
<div class="api">
  <div class="prototype">WebsSocket</div>
  <div class="apiDetail">
<p>Socket control structure.</p>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param"><a class="ref" href="#group___webs_socket_1gae03359f7e0b6d71d55a625ae867c0032">SocketAccept</a></td><td><td>accept</td><td>
Accept handler.
</td>
    <tr><td class="param">int</td><td><td>currentEvents</td><td>
Mask of ready events (FD_xx).
</td>
    <tr><td class="param">int</td><td><td>error</td><td>
Last error.
</td>
    <tr><td class="param">int</td><td><td>fileHandle</td><td>
ID of the file handler.
</td>
    <tr><td class="param">int</td><td><td>flags</td><td>
Current state flags.
</td>
    <tr><td class="param"><a class="ref" href="#group___webs_socket_1gabc472a96ad52eed12682302d4f0f5077">SocketHandler</a></td><td><td>handler</td><td>
User I/O handler.
</td>
    <tr><td class="param">void *</td><td><td>handler_data</td><td>
User handler data.
</td>
    <tr><td class="param">int</td><td><td>handlerMask</td><td>
Handler events of interest.
</td>
    <tr><td class="param">int</td><td><td>handshakes</td><td>
Number of renegotiations.
</td>
    <tr><td class="param">int</td><td><td>interestEvents</td><td>
Mask of events to watch for.
</td>
    <tr><td class="param">char *</td><td><td>ip</td><td>
Server listen address or remote client address.
</td>
    <tr><td class="param">WebsBuf</td><td><td>lineBuf</td><td>
Line ring queue.
</td>
    <tr><td class="param">int</td><td><td>port</td><td>
Port to listen on.
</td>
    <tr><td class="param">int</td><td><td>saveMask</td><td>
saved Mask for socketFlush.
</td>
    <tr><td class="param">int</td><td><td>secure</td><td>
Socket is using SSL.
</td>
    <tr><td class="param">int</td><td><td>selectEvents</td><td>
Events being selected.
</td>
    <tr><td class="param">int</td><td><td>sid</td><td>
Index into socket[].
</td>
    <tr><td class="param">Socket</td><td><td>sock</td><td>
Actual socket handle.
</td>
    </table></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1gac14f3548201f71b558822b3c68153ebe"></a>
<div class="api">
  <div class="prototype">
    int
    socketAddress
(struct sockaddr *addr, int addrlen, char *ipbuf, int ipLen, int *port)
  </div>
  <div class="apiDetail">
<p>Extract the numerical IP address and port for the given socket info.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">addr</td><td>Reference to the socket address.</td>
    <tr><td class="param">addrlen</td><td>Length of the socket address.</td>
    <tr><td class="param">ipbuf</td><td>Buffer to contain the parsed IP address.</td>
    <tr><td class="param">ipLen</td><td>Size of ipbuf.</td>
    <tr><td class="param">port</td><td>Reference to an integer to hold the parsed port.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful. Otherwise -1 for parse errors.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    socketAddressIsV6
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ip)
  </div>
  <div class="apiDetail">
<p>Determine if an IP address is an IPv6 address.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ip</td><td>String IP address.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the address is an IPv6 address.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047"></a>
<div class="api">
  <div class="prototype">
    int
    socketAlloc
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *host, int port, <a href="#group___webs_socket_1gae03359f7e0b6d71d55a625ae867c0032" class="ref">SocketAccept</a> accept, int flags)
  </div>
  <div class="apiDetail">
<p>Allocate a socket object.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">host</td><td>String host IP address.</td>
    <tr><td class="param">port</td><td>Socket port.</td>
    <tr><td class="param">accept</td><td>Optional SocketAccept accept callback function.</td>
    <tr><td class="param">flags</td><td>Control flags.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Socket ID handle to use with other APIs.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959"></a>
<div class="api">
  <div class="prototype">
    void
    socketClose
(void )
  </div>
  <div class="apiDetail">
<p>Close the socket module.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7"></a>
<div class="api">
  <div class="prototype">
    void
    socketCloseConnection
(int sid)
  </div>
  <div class="apiDetail">
<p>Close a socket connection.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1gada07f74963867ae158f0289c8483f846"></a>
<div class="api">
  <div class="prototype">
    int
    socketConnect
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *host, int port, int flags)
  </div>
  <div class="apiDetail">
<p>Connect to a server and create a new socket.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">host</td><td>Host IP address.</td>
    <tr><td class="param">port</td><td>Port number to connect to.</td>
    <tr><td class="param">flags</td><td>Set to SOCKET_BLOCK for blocking I/O. Otherwise non-blocking I/O is used.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the address is an IPv6 address.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c"></a>
<div class="api">
  <div class="prototype">
    void
    socketCreateHandler
(int sid, int mask, <a href="#group___webs_socket_1gabc472a96ad52eed12682302d4f0f5077" class="ref">SocketHandler</a> handler, void *arg)
  </div>
  <div class="apiDetail">
<p>Create a socket handler that will be invoked when I/O events occur.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
    <tr><td class="param">mask</td><td>Mask of events of interest. Set to SOCKET_READABLE | SOCKET_WRITABLE | SOCKET_EXCEPTION.</td>
    <tr><td class="param">handler</td><td>Socket handler function.</td>
    <tr><td class="param">arg</td><td>Arbitrary object reference to pass to the SocketHandler callback function.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the address is an IPv6 address.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1ga8844ac81357964309fd7e9f872ad1bd7"></a>
<div class="api">
  <div class="prototype">
    void
    socketDeleteHandler
(int sid)
  </div>
  <div class="apiDetail">
<p>Delete a socket handler created via socketCreateHandler.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    socketEof
(int sid)
  </div>
  <div class="apiDetail">
<p>Determine if the socket is at end-of-file for input.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the address is at EOF.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad"></a>
<div class="api">
  <div class="prototype">
    void
    socketFree
(int sid)
  </div>
  <div class="apiDetail">
<p>Free (and close) the socket.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7"></a>
<div class="api">
  <div class="prototype">
    int
    socketGetBlock
(int sid)
  </div>
  <div class="apiDetail">
<p>Get the current blocking mode.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the socket is in blocking mode.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04"></a>
<div class="api">
  <div class="prototype">
    int
    socketGetError
(int sid)
  </div>
  <div class="apiDetail">
<p>Get the error code for the last socket operation on this thread.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Integer error code. See errno or GetLastError() on windows.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83"></a>
<div class="api">
  <div class="prototype">
    <a href="#goahead_8h_1af9381320a2640ea84038579d8f143c01" class="ref">Socket</a>
    socketGetHandle
(int sid)
  </div>
  <div class="apiDetail">
<p>Get the underlying socket operating system socket/file handle.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The socket handle.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1gac772288c5a34e90adb7e3c0edd372576"></a>
<div class="api">
  <div class="prototype">
    <a href="#group___webs_socket" class="ref">WebsSocket</a> **
    socketGetList
(void )
  </div>
  <div class="apiDetail">
<p>Get the list of sockets.</p>
    <dl><dt>Returns:</dt><dd>The socket list pointer.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1ga41ef4201ad35371958671487b56689e3"></a>
<div class="api">
  <div class="prototype">
    int
    socketGetPort
(int sid)
  </div>
  <div class="apiDetail">
<p>Get the IP port associated with this socket.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The TCP/IP port for this socket.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1gae6ec811c6a5800916ac00db2c7c9fb30"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    socketHasDualNetworkStack
(void )
  </div>
  <div class="apiDetail">
<p>Indicate if the system has a dual IPv4 and IPv6 stack.</p>
    <dl><dt>Returns:</dt><dd>True if IPv4 and IPv6 are supported on a single stack.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1ga764eb6101ccc3ba01f775436432cfd48"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    socketHasIPv6
(void )
  </div>
  <div class="apiDetail">
<p>Indicate if the system has IPv6 support.</p>
    <dl><dt>Returns:</dt><dd>True if IPv6 is supported on this system.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1ga22d77c01e3349be30f4a24e790b72499"></a>
<div class="api">
  <div class="prototype">
    void
    socketHiddenData
(<a href="#group___webs_socket" class="ref">WebsSocket</a> *sp, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len, int dir)
  </div>
  <div class="apiDetail">
<p>Indicate that the application layer has buffered data for the socket.</p>
    <dl><dt><b>Description</b>:</dt><dd>This is used by SSL and other network stacks that buffer pending data.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sp</td><td>Socket object returned from <a class="ref" href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f">socketPtr</a></td>
    <tr><td class="param">len</td><td>Length of buffered data in bytes.</td>
    <tr><td class="param">dir</td><td>Buffer direction. Set to MPR_READABLE for buffered read data and MPR_WRITABLE for buffered write data.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1gabd3226bb7b28114550f997df00067f8c"></a>
<div class="api">
  <div class="prototype">
    int
    socketInfo
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ip, int port, int *family, int *protocol, struct sockaddr_storage *addr, <a href="#goahead_8h_1a7e81f05ea37d05efc10e7c45c1111d0d" class="ref">Socklen</a> *addrlen)
  </div>
  <div class="apiDetail">
<p>Get a socket address structure for the specified IP:Port.</p>
    <dl><dt><b>Description</b>:</dt><dd>This returns address details in *family, *protocol, *addr, and *addrlen.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ip</td><td>IP address to parse.</td>
    <tr><td class="param">port</td><td>TCP/IP port number.</td>
    <tr><td class="param">family</td><td>Reference to an integer to hold the address family.</td>
    <tr><td class="param">protocol</td><td>Reference to an integer to hold the address protocol.</td>
    <tr><td class="param">addr</td><td>Reference to an integer to hold the address structure.</td>
    <tr><td class="param">addrlen</td><td>Reference to an integer to hold the address structure length.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    socketIsV6
(int sid)
  </div>
  <div class="apiDetail">
<p>Determine if a socket is bound to an IPv6 address.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the socket is using IPv6.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1ga0a776cf248c686363c87658082170a16"></a>
<div class="api">
  <div class="prototype">
    int
    socketListen
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *host, int port, <a href="#group___webs_socket_1gae03359f7e0b6d71d55a625ae867c0032" class="ref">SocketAccept</a> accept, int flags)
  </div>
  <div class="apiDetail">
<p>Open a listening socket.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">host</td><td>Host IP address on which to listen. Set to NULL to listen on all interfaces.</td>
    <tr><td class="param">port</td><td>TCP/IP port on which to listen.</td>
    <tr><td class="param">accept</td><td>SocketAccept callback function to invoke to receive incoming connections.</td>
    <tr><td class="param">flags</td><td>Reserved.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522"></a>
<div class="api">
  <div class="prototype">
    int
    socketOpen
(void )
  </div>
  <div class="apiDetail">
<p>Open the socket module.</p>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd"></a>
<div class="api">
  <div class="prototype">
    int
    socketParseAddress
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ipAddrPort, char **pip, int *pport, int *secure, int defaultPort)
  </div>
  <div class="apiDetail">
<p>Parse an IP address into its constituent parts.</p>
    <dl><dt><b>Description</b>:</dt><dd>Parse the IP address and return the IP address and port components. Handles ipv4 and ipv6 addresses. If the IP portion is absent, pip is set to null. If the port portion is absent, port is set to the defaultPort. If a &quot;:*&quot; port specifier is used, pport is set to -1; When an address contains an ipv6 port it should be written as aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh:iiii or.</dd></dl>
If supplied an IPv6 address, the backets are stripped in the returned IP address
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ipAddrPort</td><td>IP address which may contain an optional &quot;:port&quot; component.</td>
    <tr><td class="param">pip</td><td>Returns a reference to an allocated string containing the IP address portion. Caller must free.</td>
    <tr><td class="param">pport</td><td>Reference to an integer to hold the port component.</td>
    <tr><td class="param">secure</td><td>Reference to an integer to be set to true if the address is using SSL/TLS.</td>
    <tr><td class="param">defaultPort</td><td>Default port number to use if no port specifier is included in ipAddrPort.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15"></a>
<div class="api">
  <div class="prototype">
    void
    socketProcess
(void )
  </div>
  <div class="apiDetail">
<p>Process pending socket I/O events.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f"></a>
<div class="api">
  <div class="prototype">
    <a href="#group___webs_socket" class="ref">WebsSocket</a> *
    socketPtr
(int sid)
  </div>
  <div class="apiDetail">
<p>Return the socket object for the socket ID.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Corresponding socket object.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    socketRead
(int sid, void *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)
  </div>
  <div class="apiDetail">
<p>Read data from a socket.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
    <tr><td class="param">buf</td><td>Buffer to hold read data.</td>
    <tr><td class="param">len</td><td>Size of the buffer.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Count of bytes actually read. Returns -1 for errors and EOF. Distinguish between errors and EOF via <a class="ref" href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150">socketEof()</a></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01"></a>
<div class="api">
  <div class="prototype">
    void
    socketRegisterInterest
(int sid, int mask)
  </div>
  <div class="apiDetail">
<p>Register interest in socket I/OEvents.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
    <tr><td class="param">mask</td><td>Mask of events of interest. Set to SOCKET_READABLE | SOCKET_WRITABLE | SOCKET_EXCEPTION.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac"></a>
<div class="api">
  <div class="prototype">
    void
    socketReservice
(int sid)
  </div>
  <div class="apiDetail">
<p>Request that the socket be reserviced.</p>
    <dl><dt><b>Description</b>:</dt><dd>This routine is useful when upper layers have unprocessed, buffered data for the socket. This routine will cause the socket I/O callback handler to be invoked soon in the future.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f"></a>
<div class="api">
  <div class="prototype">
    int
    socketSelect
(int sid, int timeout)
  </div>
  <div class="apiDetail">
<p>Wait for I/O on a socket.</p>
    <dl><dt><b>Description</b>:</dt><dd>This call uses the mask of events of interest defined by socketRegisterInterest. It blocks the caller until a suitable I/O event or timeout occurs.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
    <tr><td class="param">timeout</td><td>Timeout in milliseconds.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Number of I/O events.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1ga87a2c90218477d33c088510d629174c7"></a>
<div class="api">
  <div class="prototype">
    int
    socketSetBlock
(int sid, int on)
  </div>
  <div class="apiDetail">
<p>Set the socket blocking mode.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
    <tr><td class="param">on</td><td>Set to 1 to enable blocking.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The previous blocking mode.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac"></a>
<div class="api">
  <div class="prototype">
    void
    socketSetError
(int error)
  </div>
  <div class="apiDetail">
<p>Set the error code for the last socket operation on this thread.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">error</td><td>Integer error code. See errno or GetLastError() on windows.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1ga172c24a34fcdff1a79fdde165738e07c"></a>
<div class="api">
  <div class="prototype">
    int
    socketSetNoDelay
(int sid, <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> on)
  </div>
  <div class="apiDetail">
<p>Set the socket delay mode.</p>
    <dl><dt><b>Description</b>:</dt><dd>This is used to enable or disable the TCP Nagle algorithm.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
    <tr><td class="param">on</td><td>Set to 1 to disable the Nagle algorithm.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The previous blocking mode.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9"></a>
<div class="api">
  <div class="prototype">
    int
    socketWaitForEvent
(<a href="#group___webs_socket" class="ref">WebsSocket</a> *sp, int mask)
  </div>
  <div class="apiDetail">
<p>Wait for a socket I/O event.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sp</td><td>Socket object.</td>
    <tr><td class="param">mask</td><td>Mask of events of interest. Set to SOCKET_READABLE | SOCKET_WRITABLE | SOCKET_EXCEPTION.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful in waiting for the desired event, otherwise return -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
    socketWrite
(int sid, void *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)
  </div>
  <div class="apiDetail">
<p>Write data to the socket.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
    <tr><td class="param">buf</td><td>Buffer containing data to write.</td>
    <tr><td class="param">len</td><td>Size of buf.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Count of bytes written. May be less than len if the socket is in non-blocking mode. Returns -1 for errors and if the socket cannot absorb any more data. If the transport is saturated, will return a negative error and errno will be set to EAGAIN or EWOULDBLOCK.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a></dd></dl>
  </div>
</div>
<h1>WebsUpload</h1>
<a name="group___webs_upload"></a>
<div class="api">
  <div class="prototype">WebsUpload</div>
  <div class="apiDetail">
<p>File upload structure.</p>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_upload_1gaf80a429f3b30c1e621e917c8f04f0415" class="ref">websGetUpload</a>, <a href="#group___webs_upload_1ga5013b6ef4b2b9be6ea09dea369a8f409" class="ref">websLookupUpload</a>, <a href="#group___webs_upload_1gab33d19bbf16e0437f2210fb832453f0b" class="ref">websUploadOpen</a></dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">char *</td><td><td>clientFilename</td><td>
Client side name of the file.
</td>
    <tr><td class="param">char *</td><td><td>contentType</td><td>
Content type.
</td>
    <tr><td class="param">char *</td><td><td>filename</td><td>
Local (temp) name of the file.
</td>
    <tr><td class="param">ssize</td><td><td>size</td><td>
Uploaded file size.
</td>
    </table></dd></dl>
  </div>
</div>
<a name="group___webs_upload_1gaf80a429f3b30c1e621e917c8f04f0415"></a>
<div class="api">
  <div class="prototype">
    <a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="ref">WebsHash</a>
    websGetUpload
(struct Webs *wp)
  </div>
  <div class="apiDetail">
<p>Get the hash of uploaded files for the request.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Hash table of uploaded files.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_upload_1ga5013b6ef4b2b9be6ea09dea369a8f409" class="ref">websLookupUpload</a>, <a href="#group___webs_upload_1gab33d19bbf16e0437f2210fb832453f0b" class="ref">websUploadOpen</a></dd></dl>
  </div>
</div>
<a name="group___webs_upload_1ga5013b6ef4b2b9be6ea09dea369a8f409"></a>
<div class="api">
  <div class="prototype">
    <a href="#group___webs_upload" class="ref">WebsUpload</a> *
    websLookupUpload
(struct Webs *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key)
  </div>
  <div class="apiDetail">
<p>Open the file upload filter.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">key</td><td>Form upload name.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Upload object for the uploaded file.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_upload_1gaf80a429f3b30c1e621e917c8f04f0415" class="ref">websGetUpload</a>, <a href="#group___webs_upload_1gab33d19bbf16e0437f2210fb832453f0b" class="ref">websUploadOpen</a></dd></dl>
  </div>
</div>
<a name="group___webs_upload_1gab33d19bbf16e0437f2210fb832453f0b"></a>
<div class="api">
  <div class="prototype">
    void
    websUploadOpen
(void )
  </div>
  <div class="apiDetail">
<p>Open the file upload filter.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_upload_1gaf80a429f3b30c1e621e917c8f04f0415" class="ref">websGetUpload</a>, <a href="#group___webs_upload_1ga5013b6ef4b2b9be6ea09dea369a8f409" class="ref">websLookupUpload</a></dd></dl>
  </div>
</div>
<h2>Functions</h2>
<a name="goahead_8h_1a80adc8087f3a20a2669565b281d57a38"></a>
<div class="api">
  <div class="prototype">
    void
    assert
(<a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> cond)
  </div>
  <div class="apiDetail">
<p>Assure that an assert condition is true.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cond</td><td>Boolean result of a conditional test.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="goahead_8h_1a03544bf56dde3a257391d07e1d6f6a3a"></a>
<div class="api">
  <div class="prototype">
    void
    error
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)
  </div>
  <div class="apiDetail">
<p>Emit an error message.</p>
    <dl><dt>Returns:</dt><dd>Zero if successful.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="goahead_8h_1a95bd348305d4a3044216ec4d694cd1d4"></a>
<div class="api">
  <div class="prototype">
    void
    logClose
(void )
  </div>
  <div class="apiDetail">
<p>Close the log logging module.</p>
  </div>
</div>
<a name="goahead_8h_1af07cb7c6e3a418059b33eb2243e0e945"></a>
<div class="api">
  <div class="prototype">
    <a href="#goahead_8h_1ab4a2aa1bcdb9d47e37c84baa32cbf5fb" class="ref">WebsLogHandler</a>
    logGetHandler
(void )
  </div>
  <div class="apiDetail">
<p>Get the log callback.</p>
    <dl><dt>Returns:</dt><dd>Handler Callback handler function of type WebsLogHandler.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="goahead_8h_1a02f3703e8699520d66c2477e225af267"></a>
<div class="api">
  <div class="prototype">
    void
    logmsgProc
(int level, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)
  </div>
  <div class="apiDetail">
<p>Emit a message to the log.</p>
    <dl><dt><b>Description</b>:</dt><dd>This emits a message at the specified level. GoAhead filters logging messages by defining a verbosity level at startup. Level 0 is the least verbose where only the most important messages will be output. Level 9 is the Logging support is enabled by the MakeMe setting: &quot;logging: true&quot; which creates the ME_GOAHEAD_LOGGING define in me.h most verbose. Level 2-4 are the most useful for debugging.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">level</td><td>Integer verbosity level (0-9).</td>
    <tr><td class="param">fmt</td><td>Printf style format string.</td>
    <tr><td class="param">...</td><td>Arguments for the format string.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="goahead_8h_1a2c0c1dd956ebfaf981553f5a99cd7bb7"></a>
<div class="api">
  <div class="prototype">
    int
    logOpen
(void )
  </div>
  <div class="apiDetail">
<p>Open the log logging module.</p>
    <dl><dt>Returns:</dt><dd>Zero if successful.</dd></dl>
  </div>
</div>
<a name="goahead_8h_1a69d48d711cafc09c257c41705b29eb6a"></a>
<div class="api">
  <div class="prototype">
    <a href="#goahead_8h_1ab4a2aa1bcdb9d47e37c84baa32cbf5fb" class="ref">WebsLogHandler</a>
    logSetHandler
(<a href="#goahead_8h_1ab4a2aa1bcdb9d47e37c84baa32cbf5fb" class="ref">WebsLogHandler</a> handler)
  </div>
  <div class="apiDetail">
<p>Set a log callback.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">handler</td><td>Callback handler function of type WebsLogHandler.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The previous callback function.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="goahead_8h_1a973f65430b9ee826c6906891d2173bd3"></a>
<div class="api">
  <div class="prototype">
    void
    logSetPath
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
  </div>
  <div class="apiDetail">
<p>Set the filename to save logging output.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">path</td><td>Filename path to use.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="goahead_8h_1a5eec22bfd3a58a8c344d30175849f2ee"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    sstarts
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *prefix)
  </div>
  <div class="apiDetail">
<p>Test if the string starts with a given pattern.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">str</td><td>String to examine.</td>
    <tr><td class="param">prefix</td><td>Pattern to search for.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Returns TRUE if the pattern was found. Otherwise returns zero.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="goahead_8h_1a377d5247f829befd58214234183e84ee"></a>
<div class="api">
  <div class="prototype">
    void
    traceProc
(int level, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)
  </div>
  <div class="apiDetail">
<p>Emit a debug trace message to the log.</p>
    <dl><dt><b>Description</b>:</dt><dd>This emits a message at the specified level. GoAhead filters logging messages by defining a verbosity level at startup. Level 0 is the least verbose where only the most important messages will be output. Level 9 is the most verbose. Level 2-4 are the most useful for debugging. Debug trace support is enabled by the MakeMe setting: &quot;tracing: true&quot; which creates the ME_GOAHEAD_TRACING define in me.h.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">level</td><td>Integer verbosity level (0-9).</td>
    <tr><td class="param">fmt</td><td>Printf style format string.</td>
    <tr><td class="param">...</td><td>Arguments for the format string.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="goahead_8h_1ac5058870cad6692d50f7fa9775a56c25"></a>
<div class="api">
  <div class="prototype">
    void
    valueFree
(<a href="#struct_webs_value" class="ref">WebsValue</a> *value)
  </div>
  <div class="apiDetail">
<p>Free any allocated string in a value.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">value</td><td>Value object.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="goahead_8h_1aa27f5beea810d9124985ecf1c1fe41fa"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_webs_value" class="ref">WebsValue</a>
    valueInteger
(long value)
  </div>
  <div class="apiDetail">
<p>Create an integer value.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">value</td><td>Integer long value.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Value object containing the integer.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="goahead_8h_1adb8296687c9b528cfa0d9deb2eb42cf0"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_webs_value" class="ref">WebsValue</a>
    valueString
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value, int flags)
  </div>
  <div class="apiDetail">
<p>Create an string value.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">value</td><td>String long value.</td>
    <tr><td class="param">flags</td><td>Set to VALUE_ALLOCATE to store a copy of the string reference.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Value object containing the string.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="goahead_8h_1aa9292efb92931035fbdb7e8cc9fc2a58"></a>
<div class="api">
  <div class="prototype">
    <a href="#struct_webs_value" class="ref">WebsValue</a>
    valueSymbol
(void *value)
  </div>
  <div class="apiDetail">
<p>Create an symbol value containing an object reference.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">value</td><td>Value reference.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Value object containing the symbol reference.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="goahead_8h_1a8fcf6c446be29f4fa9e558cef4f62428"></a>
<div class="api">
  <div class="prototype">
    void *
    walloc
(<a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)
  </div>
  <div class="apiDetail">
<p>Allocate a block of the requested size.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">size</td><td>Memory size required.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>A reference to the allocated block.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="goahead_8h_1ab07b7c0b89520599c586358086c52568"></a>
<div class="api">
  <div class="prototype">
    void
    wcloseAlloc
(void )
  </div>
  <div class="apiDetail">
<p>Close the GoAhead memory allocator.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="goahead_8h_1a364829588ded7824a6226c71dda5bd43"></a>
<div class="api">
  <div class="prototype">
    void *
    wdup
(<a href="osdep.html#osdep_8h_1a5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *ptr, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> usize)
  </div>
  <div class="apiDetail">
<p>Duplicate memory.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">ptr</td><td>Original block reference.</td>
    <tr><td class="param">usize</td><td>Size to allocate.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Reference to the new memory block.</dd></dl>
  </div>
</div>
<a name="goahead_8h_1a93ffe2fd6f833e223e48dac77c650daa"></a>
<div class="api">
  <div class="prototype">
    <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
    websCheckPassword
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *plainTextPassword, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *passwordHash)
  </div>
  <div class="apiDetail">
<p>Check a plain-text password against the defined hashed password.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">plainTextPassword</td><td>User&apos;s plain-text-password to check.</td>
    <tr><td class="param">passwordHash</td><td>Required password in hashed format previously computed by websMakePassword.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the password is correct.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Prototype.</dd></dl>
  </div>
</div>
<a name="goahead_8h_1afd405fa10ef57a17f18b099e7cee1ee2"></a>
<div class="api">
  <div class="prototype">
    char *
    websCryptPassword
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *password, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *salt, int rounds)
  </div>
  <div class="apiDetail">
<p>Encrypt a password using the Blowfish algorithm.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">password</td><td>User&apos;s password to encrypt.</td>
    <tr><td class="param">salt</td><td>Salt text to add to password. Helps to make each user&apos;s password unique.</td>
    <tr><td class="param">rounds</td><td>Number of times to encrypt. More times, makes the routine slower and passwords harder to crack.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The encrypted password.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Prototype.</dd></dl>
  </div>
</div>
<a name="goahead_8h_1a3bc1b2f042bfc719a05eb1b9adb0776b"></a>
<div class="api">
  <div class="prototype">
    int
    websGetRandomBytes
(char *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> length, <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> block)
  </div>
  <div class="apiDetail">
<p>Get some random data.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Reference to a buffer to hold the random data.</td>
    <tr><td class="param">length</td><td>Size of the buffer.</td>
    <tr><td class="param">block</td><td>Set to true if it is acceptable to block while accumulating entropy sufficient to provide good random data. Setting to false will cause this API to not block and may return random data of a lower quality.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Prototype.</dd></dl>
  </div>
</div>
<a name="goahead_8h_1a91d31000f4f654a4f0d58acf73dbc169"></a>
<div class="api">
  <div class="prototype">
    char *
    websMakePassword
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *password, int saltLength, int rounds)
  </div>
  <div class="apiDetail">
<p>Make a password hash for a plain-text password using the Blowfish algorithm.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">password</td><td>User&apos;s password to encrypt.</td>
    <tr><td class="param">saltLength</td><td>Length of salt text to add to password. Helps to make each user&apos;s password unique.</td>
    <tr><td class="param">rounds</td><td>Number of times to encrypt. More times, makes the routine slower and passwords harder to crack.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The encrypted password. Caller must free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Prototype.</dd></dl>
  </div>
</div>
<a name="goahead_8h_1ad9f484cc1aa0aec171b19795a961b618"></a>
<div class="api">
  <div class="prototype">
    char *
    websMakeSalt
(<a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)
  </div>
  <div class="apiDetail">
<p>Make salt for adding to a password.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">size</td><td>Size in bytes of the salt text.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The random salt text. Caller must free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Prototype.</dd></dl>
  </div>
</div>
<a name="goahead_8h_1a55f60843dbda2cebe58dd6a2c8ad7f76"></a>
<div class="api">
  <div class="prototype">
    char *
    websReadPassword
(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *prompt)
  </div>
  <div class="apiDetail">
<p>Get a password from the terminal console.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">prompt</td><td>Text prompt to display before reading the password.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>The entered password. Caller must free.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Prototype.</dd></dl>
  </div>
</div>
<a name="goahead_8h_1a5a271ccc2e8fbc76a49f2f2022db21cc"></a>
<div class="api">
  <div class="prototype">
    void
    websSetBackgroundWriter
(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="#goahead_8h_1ab831e30480b27feb88a15c09f382719f" class="ref">WebsWriteProc</a> proc)
  </div>
  <div class="apiDetail">
<p>Define a background write I/O event callback.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">proc</td><td>Write callback.</td>
    </table></dd></dl>
  </div>
</div>
<a name="goahead_8h_1ae8c0353bf1c238af495fa5e4122b4af6"></a>
<div class="api">
  <div class="prototype">
    void
    websSetMemNotifier
(<a href="#goahead_8h_1afba3dd63a743f10ca6c166335f2ba7a9" class="ref">WebsMemNotifier</a> cback)
  </div>
  <div class="apiDetail">
<p>Define a global memory allocation notifier.</p>
    <dl><dt><b>Description</b>:</dt><dd>The notifier is called if any memory allocation fails. It is called with the requested allocation size as its only parameter.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">cback</td><td>Callback function to invoke for allocation failures.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Evolving.</dd></dl>
  </div>
</div>
<a name="goahead_8h_1acd2db135e5aacbdc8e6a1f766298b2dd"></a>
<div class="api">
  <div class="prototype">
    void
    wfree
(void *blk)
  </div>
  <div class="apiDetail">
<p>Free an allocated block of memory.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">blk</td><td>Reference to the memory block to free.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="goahead_8h_1a0cdb01392e19df341254c5b2f593c654"></a>
<div class="api">
  <div class="prototype">
    int
    wopenAlloc
(void *buf, int bufsize, int flags)
  </div>
  <div class="apiDetail">
<p>Initialize the walloc module.</p>
    <dl><dt><b>Description</b>:</dt><dd>The wopenAlloc function should be called the very first thing after the application starts and wclose should be called the last thing before exiting. If wopenAlloc is not called, it will be called on the first allocation with default values. &quot;buf&quot; points to memory to use of size &quot;bufsize&quot;. If buf is NULL, memory is allocated using malloc. flags may be set to WEBS_USE_MALLOC if using malloc is okay. This routine will allocate * an initial buffer of size bufsize for use by the application.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">buf</td><td>Optional user supplied block of memory to use for allocations.</td>
    <tr><td class="param">bufsize</td><td>Size of buf.</td>
    <tr><td class="param">flags</td><td>Allocation flags. Set to WEBS_USE_MALLOC to permit the use of malloc() to grow memory.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<a name="goahead_8h_1a7cf93f44c111affc69d877812da50bae"></a>
<div class="api">
  <div class="prototype">
    void *
    wrealloc
(void *blk, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> newsize)
  </div>
  <div class="apiDetail">
<p>Reallocate a block of memory and grow its size.</p>
    <dl><dt><b>Description</b>:</dt><dd>If the new size is larger than the existing block, a new block will be allocated and the old data will be copied to the new block.</dd></dl>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">blk</td><td>Original block reference.</td>
    <tr><td class="param">newsize</td><td>Size of the new block.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Reference to the new memory block.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
  </div>
</div>
<h2>Typedefs</h2>
<a name="goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67"></a>
<div class="api">
  <div class="prototype">
    typedef int WebsHash.
  </div>
  <div class="apiDetail">
<p>Hash table ID returned by hashCreate.</p>
  </div>
</div>
<a name="goahead_8h_1ab4a2aa1bcdb9d47e37c84baa32cbf5fb"></a>
<div class="api">
  <div class="prototype">
    typedef void(* WebsLogHandler) (int level, cchar *msg).
  </div>
  <div class="apiDetail">
<p>Callback for emitting trace log output.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">level</td><td>Integer between 0 and 9. Zero is the lowest trace level used for the most important messages.</td>
    <tr><td class="param">msg</td><td>Message to log.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Zero if successful.</dd></dl>
  </div>
</div>
<a name="goahead_8h_1a3a874b92bbb07540254ed16567db3aa3"></a>
<div class="api">
  <div class="prototype">
    typedef struct stat WebsStat.
  </div>
  <div class="apiDetail">
<p>File status structure.</p>
  </div>
</div>
<a name="goahead_8h_1acdd9aaf80c8e9b08b3cf94200c91a6ae"></a>
<div class="api">
  <div class="prototype">
    typedef time_t WebsTime.
  </div>
  <div class="apiDetail">
<p>System native time type.</p>
This is the time in seconds. This may be 32 or 64 bits and may be signed or unsigned on some systems
  </div>
</div>
<a name="goahead_8h_1ab831e30480b27feb88a15c09f382719f"></a>
<div class="api">
  <div class="prototype">
    typedef void(* WebsWriteProc) (struct Webs *wp).
  </div>
  <div class="apiDetail">
<p>Callback for write I/O events.</p>
  </div>
</div>
<a name="group___webs_1gacbbbea4092b366e954f77916957cf6c5"></a>
<div class="api">
  <div class="prototype">
    typedef void(* WebsAction) (Webs *wp).
  </div>
  <div class="apiDetail">
<p>Action callback.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga00798847832d6e6b032e7423a3bf5bb2"></a>
<div class="api">
  <div class="prototype">
    typedef void(* WebsAskLogin) (Webs *wp).
  </div>
  <div class="apiDetail">
<p>Callback to prompt the user for their password.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga6b8f7c9a8138c1c585ec1c2b7aa7a954"></a>
<div class="api">
  <div class="prototype">
    typedef void(* WebsHandlerClose) (void).
  </div>
  <div class="apiDetail">
<p>GoAhead handler close to release memory prior to shutdown.</p>
    <dl><dt><b>Description</b>:</dt><dd>This callback is invoked when GoAhead is shutting down.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga1b14d912d52adc694c3c713ec0a17412"></a>
<div class="api">
  <div class="prototype">
    typedef bool(* WebsHandlerProc) (Webs *wp).
  </div>
  <div class="apiDetail">
<p>GoAhead handler service callback.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the handler serviced the request.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga35aa7f7f128a9d1a4c4f3eeb7849d638"></a>
<div class="api">
  <div class="prototype">
    typedef int(* WebsJstProc) (int jid, Webs *wp, int argc, char **argv).
  </div>
  <div class="apiDetail">
<p>Javascript native function.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">jid</td><td>JavaScript engine ID.</td>
    <tr><td class="param">wp</td><td>Webs request object.</td>
    <tr><td class="param">argc</td><td>Count of function arguments.</td>
    <tr><td class="param">argv</td><td>Array of function arguments.</td>
    <tr><td class="param">defaultValue</td><td>Default value to return if the variable is not defined.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>Return zero if successful, otherwise -1.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga8813a82488191e0cb2df0f7cafcd1414"></a>
<div class="api">
  <div class="prototype">
    typedef bool(* WebsParseAuth) (Webs *wp).
  </div>
  <div class="apiDetail">
<p>Callback to parse authentication details submitted with the web request.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the details can be parsed.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_1ga196a6343b64e6944f3b77b8af709a7e8"></a>
<div class="api">
  <div class="prototype">
    typedef bool(* WebsVerify) (Webs *wp).
  </div>
  <div class="apiDetail">
<p>Callback to verify the username and password.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">wp</td><td>Webs request object.</td>
    </table></dd></dl>
    <dl><dt>Returns:</dt><dd>True if the password is verified.</dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    </dd></dl>
  </div>
</div>
<a name="group___webs_runtime_1gacc671375a3241fd84d5151c9dd001dc7"></a>
<div class="api">
  <div class="prototype">
    typedef void(* WebsEventProc) (void *data, int id).
  </div>
  <div class="apiDetail">
<p>Callback function for events.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">data</td><td>Opaque data argument.</td>
    <tr><td class="param">id</td><td>Event ID.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1gae03359f7e0b6d71d55a625ae867c0032"></a>
<div class="api">
  <div class="prototype">
    typedef int(* SocketAccept) (int sid, cchar *ipaddr, int port, int listenSid).
  </div>
  <div class="apiDetail">
<p>Socket accept callback.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sid</td><td>Socket ID handle for the newly accepted socket.</td>
    <tr><td class="param">ipaddr</td><td>IP address of the connecting client.</td>
    <tr><td class="param">port</td><td>Port of the connecting client.</td>
    <tr><td class="param">listenSid</td><td>Socket ID for the listening socket.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
  </div>
</div>
<a name="group___webs_socket_1gabc472a96ad52eed12682302d4f0f5077"></a>
<div class="api">
  <div class="prototype">
    typedef void(* SocketHandler) (int sid, int mask, void *data).
  </div>
  <div class="apiDetail">
<p>Socket I/O callback.</p>
    <dl><dt>Parameters:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or when a new socket is passed to a SocketAccept callback.</td>
    <tr><td class="param">mask</td><td>Mask of events of interest. Set to SOCKET_READABLE | SOCKET_WRITABLE | SOCKET_EXCEPTION.</td>
    <tr><td class="param">data</td><td>Data argument to pass to the callback function.</td>
    </table></dd></dl>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>See Also:</dt><dd>
    <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
  </div>
</div>
<a name="struct_webs_error"></a>
<div class="api">
  <div class="prototype">WebsError</div>
  <div class="apiDetail">
<p>Error code list.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">int</td><td><td>code</td><td>
HTTP error code.
</td>
    <tr><td class="param">char *</td><td><td>msg</td><td>
HTTP error message.
</td>
    </table></dd></dl>
  </div>
</div>
<a name="struct_webs_file_info"></a>
<div class="api">
  <div class="prototype">WebsFileInfo</div>
  <div class="apiDetail">
<p>File information structure.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">int</td><td><td>isDir</td><td>
Set if directory.
</td>
    <tr><td class="param">WebsTime</td><td><td>mtime</td><td>
Modified time.
</td>
    <tr><td class="param">ulong</td><td><td>size</td><td>
File length.
</td>
    </table></dd></dl>
  </div>
</div>
<a name="struct_webs_handler"></a>
<div class="api">
  <div class="prototype">WebsHandler</div>
  <div class="apiDetail">
<p>GoAhead handler object.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param"><a class="ref" href="#group___webs_1ga6b8f7c9a8138c1c585ec1c2b7aa7a954">WebsHandlerClose</a></td><td><td>close</td><td>
Handler close callback <br/>
</td>
    <tr><td class="param">int</td><td><td>flags</td><td>
Handler control flags.
</td>
    <tr><td class="param"><a class="ref" href="#group___webs_1ga1b14d912d52adc694c3c713ec0a17412">WebsHandlerProc</a></td><td><td>match</td><td>
Handler match callback.
</td>
    <tr><td class="param">char *</td><td><td>name</td><td>
Handler name.
</td>
    <tr><td class="param"><a class="ref" href="#group___webs_1ga1b14d912d52adc694c3c713ec0a17412">WebsHandlerProc</a></td><td><td>service</td><td>
Handler service callback.
</td>
    </table></dd></dl>
  </div>
</div>
<a name="struct_webs_mime"></a>
<div class="api">
  <div class="prototype">WebsMime</div>
  <div class="apiDetail">
<p>Mime type list.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">char *</td><td><td>ext</td><td>
File extension.
</td>
    <tr><td class="param">char *</td><td><td>type</td><td>
Mime type.
</td>
    </table></dd></dl>
  </div>
</div>
<a name="struct_webs_role"></a>
<div class="api">
  <div class="prototype">WebsRole</div>
  <div class="apiDetail">
<p>Role definition structure.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">WebsHash</td><td><td>abilities</td><td>
Resolved role abilities.
</td>
    </table></dd></dl>
  </div>
</div>
<a name="struct_webs_rom_index"></a>
<div class="api">
  <div class="prototype">WebsRomIndex</div>
  <div class="apiDetail">
<p>Compiled Rom Page Index.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">uchar *</td><td><td>page</td><td>
Web page data.
</td>
    <tr><td class="param">char *</td><td><td>path</td><td>
Web page URL path.
</td>
    <tr><td class="param">Offset</td><td><td>pos</td><td>
Current read position.
</td>
    <tr><td class="param">int</td><td><td>size</td><td>
Size of web page in bytes.
</td>
    </table></dd></dl>
  </div>
</div>
<a name="struct_webs_user"></a>
<div class="api">
  <div class="prototype">WebsUser</div>
  <div class="apiDetail">
<p>User definition structure.</p>
    <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
    <tr><td class="param">WebsHash</td><td><td>abilities</td><td>
Resolved user abilities.
</td>
    <tr><td class="param">char *</td><td><td>name</td><td>
User name.
</td>
    <tr><td class="param">char *</td><td><td>password</td><td>
User password (encrypted).
</td>
    <tr><td class="param">char *</td><td><td>roles</td><td>
User roles.
</td>
    </table></dd></dl>
  </div>
</div>
<a name="struct_webs_value"></a>
<div class="api">
  <div class="prototype">WebsValue</div>
  <div class="apiDetail">
<p>Value union to store primitive value types.</p>
    <dl><dt>Fields:</dt><dd>
    <table class="parameters" title="Parameters">
    </table></dd></dl>
  </div>
</div>
